Java Collection to String buildStringFromListForNuma(Collection list)

Here you can find the source of buildStringFromListForNuma(Collection list)

Description

build String From List For Numa

License

Apache License

Declaration

public static String buildStringFromListForNuma(Collection<Integer> list) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    public static String buildStringFromListForNuma(Collection<Integer> list) {
        if (!list.isEmpty()) {
            StringBuilder sb = new StringBuilder();
            for (Integer item : list) {
                sb.append(item);/*from   w  w  w  .  j  a  v  a  2s.  c  om*/
                sb.append(",");
            }
            return sb.deleteCharAt(sb.length() - 1).toString();
        }
        return "";
    }
}

Related

  1. asStringArr(Collection collection)
  2. asStringArray(Collection coll)
  3. asStringArray(Collection collection)
  4. buildString(Collection args, String seperator, int startingArg, int maxLength)
  5. buildString(Collection keys)
  6. collectionToCommaDelimitedString(Collection items)
  7. collectionToCommaDelimitedString(Collection list)
  8. collectionToCommaSeparatedString(Collection elementCollection)
  9. collectionToCommaSeparatedString(List list)