Java String to List stringsToList(final String[] src)

Here you can find the source of stringsToList(final String[] src)

Description

strings To List

License

Apache License

Declaration

public static List<String> stringsToList(final String[] src) 

Method Source Code

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

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List<String> stringsToList(final String[] src) {
        if (src == null || src.length == 0) {
            return null;
        }//  w w w  . j a v a2s. c  om
        final List<String> result = new ArrayList<String>();
        for (int i = 0; i < src.length; i++) {
            result.add(src[i]);
        }
        return result;
    }
}

Related

  1. convertToList(String inputString)
  2. convertToList(String str)
  3. convertToList(String string, String delim)
  4. convertToList(String vars)
  5. convertToList(String[] array)
  6. stringToArrayList(String idString)
  7. stringToBooleanList(final String str, final boolean[] listData)
  8. stringToIntegerList(String input)
  9. stringToItems(List fontsList, boolean useSeparator)