Java List Create createStringList(String csvString)

Here you can find the source of createStringList(String csvString)

Description

create String List

License

Open Source License

Declaration

public static List<String> createStringList(String csvString) 

Method Source Code

//package com.java2s;
/**/*from w  w  w. j  a  v a  2  s.  c  om*/
 * Copyright (c) 2012 eXtensible Catalog Organization
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the MIT/X11 license. The text of the license can be
 * found at http://www.opensource.org/licenses/mit-license.php.
 */

import java.util.*;

public class Main {
    public static List<String> createStringList(String csvString) {

        List<String> result;
        if (csvString != null && !csvString.isEmpty()) {

            String[] schemaURLs = csvString.split(", ?");
            result = Arrays.asList(schemaURLs);

        } else {

            result = new ArrayList<String>(0);

        }

        return result;

    }
}

Related

  1. createSpaceDelimitedString(List stringList)
  2. createStringDummyList()
  3. createStringFromIntArray( List listOfNumbers)
  4. createStringFromIntegerList(List lst)
  5. CreateStringList(Collection values)
  6. createStringList(String spaceDelimitedString)
  7. createStringListFromStringArr(String[] stringArr)
  8. createSubList(Collection source, Class type)
  9. createSublist(final T[] elements, final Class listImplementation)