Lines Matching refs:list
20 import java.util.List;
67 ArrayList<String> list = new ArrayList<String>();
71 while ((end = input.indexOf(ch, begin)) != -1 && list.size() + 1 < maxSize) {
72 list.add(input.substring(begin, end));
75 return finishSplit(list, input, begin, maxSize, limit);
91 ArrayList<String> list = new ArrayList<String>();
95 while (matcher.find() && list.size() + 1 < maxSize) {
96 list.add(input.substring(begin, matcher.start()));
99 return finishSplit(list, input, begin, maxSize, limit);
102 private static String[] finishSplit(List<String> list, String input, int begin, int maxSize, int limit) {
105 list.add(input.substring(begin));
107 list.add("");
111 int i = list.size() - 1;
112 while (i >= 0 && list.get(i).isEmpty()) {
113 list.remove(i);
118 return list.toArray(new String[list.size()]);