Java String to List stringToList(String listText)

Here you can find the source of stringToList(String listText)

Description

string To List

License

Apache License

Declaration

public static List<Object> stringToList(String listText) 

Method Source Code

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

import java.util.ArrayList;

import java.util.List;

public class Main {
    private static final String SEP1 = "=";

    public static List<Object> stringToList(String listText) {
        if (listText == null || listText.equals("")) {
            return null;
        }//from  w ww  .  j  av a2 s .c om

        List<Object> list = new ArrayList<Object>();
        String[] text = listText.split(SEP1);
        for (String str : text) {
            list.add(str);
        }
        return list;
    }
}

Related

  1. stringToList(String content, String splitter)
  2. stringToList(String delimitedString)
  3. stringToList(String input)
  4. stringToList(String keywords, String delimiter)
  5. stringToList(String listString, String delimiter)
  6. StringToList(String listText, String regex)
  7. stringToList(String s)
  8. stringToList(String s)
  9. stringToList(String s)