Java List to String listToString(final List stringList)

Here you can find the source of listToString(final List stringList)

Description

list To String

License

Open Source License

Declaration

public static String listToString(final List<String> stringList) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static String listToString(final List<String> stringList) {
        StringBuffer str = new StringBuffer();
        if (isNull(stringList)) {
            return null;
        } else {/*from   www .  j  ava 2  s  .c om*/
            for (String string : stringList) {
                str.append(string);
                str.append(",");
            }
        }
        return str.toString();
    }

    public static boolean isNull(final Object obj) {
        if (obj == null) {
            return true;
        }
        return false;
    }
}

Related

  1. listToString (final List l)
  2. listToString(Collection col)
  3. listToString(Collection l)
  4. listToString(final List list, final String separator)
  5. listToString(final List list)
  6. listToString(Iterable list)
  7. listToString(List a, String separator)
  8. listToString(List inList, String delimeter)
  9. listToString(List l)