Here you can find the source of listLongToString(List
Parameter | Description |
---|---|
inputList | a parameter |
public static String listLongToString(List<Long> inputList)
//package com.java2s; import java.util.List; public class Main { private static final String COMMA = ","; /**//from w w w . j av a 2s.c om * list -> String * list:100,200,300 - > string:100,200,300 * * @param inputList * @return */ public static String listLongToString(List<Long> inputList) { if (null == inputList || inputList.isEmpty()) { return ""; } StringBuffer sb = new StringBuffer(); for (Long input : inputList) { sb.append(input); sb.append(COMMA); } sb.setLength(sb.length() - 1); return sb.toString(); } }