Splits sequence into string components and returns them as an immutable list. If you want an Iterable which may be lazily evaluated, use #split(CharSequence). @param sequence the sequence of characters to split @return an immutable list of the segments split from the paramet
(CharSequence sequence)
| 419 | */ |
| 420 | |
| 421 | @Beta |
| 422 | public List<String> splitToList(CharSequence sequence) { |
| 423 | checkNotNull(sequence); |
| 424 | Iterator<String> iterator = splittingIterator(sequence); |
| 425 | List<String> result = new ArrayList<String>(); |
| 426 | while (iterator.hasNext()) { |
| 427 | result.add(iterator.next()); |
| 428 | } |
| 429 | return Collections.unmodifiableList(result); |
| 430 | } |
| 431 | |
| 432 | /** |
| 433 | * Returns a {@code MapSplitter} which splits entries based on this splitter, and splits entries |
nothing calls this directly
no test coverage detected