Java Comma Separated List splitListWithComma(List StringList)

Here you can find the source of splitListWithComma(List StringList)

Description

split List With Comma

License

Open Source License

Declaration

public static String splitListWithComma(List StringList) 

Method Source Code

//package com.java2s;
/**//w  w  w.j  a  v  a 2 s.  co  m
 * Program  : CommonsFiend.java
 * Author   : niehai
 * Create   : 2008-5-14 ????05:05:54
 *
 * Copyright 2007 by Embedded Internet Solutions Inc.,
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Embedded Internet Solutions Inc.("Confidential Information").
 * You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement
 * you entered into with Embedded Internet Solutions Inc.
 *
 */

import java.util.List;

public class Main {

    public static String splitListWithComma(List StringList) {
        StringBuffer strOfList = new StringBuffer("");
        for (int i = 0; i < StringList.size(); i++) {
            if (i != 0) {
                strOfList.append(",");
            }
            strOfList.append(StringList.get(i).toString());
        }
        return strOfList.toString();
    }
}

Related

  1. parseCommaList(String nameCommaList)
  2. parseRsfCommands(List rsfLines, List addItemCommands, List appendEntryCommands)
  3. resolveCommandParam(List params, String name, double defaultValue)
  4. splitCommandsToList(String row, String delimiter)
  5. splitListByComma(List hosts)
  6. splitOnCommas(final String commaSeparatedList)
  7. stringListStringWithoutBracketsCommaSeparated(List list)
  8. stringsToCommaString(List strings)
  9. stringToCommaText(List strings)