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)
| 406 | * @since 15.0 |
| 407 | */ |
| 408 | @Beta |
| 409 | public List<String> splitToList(CharSequence sequence) { |
| 410 | checkNotNull(sequence); |
| 411 | |
| 412 | Iterator<String> iterator = splittingIterator(sequence); |
| 413 | List<String> result = new ArrayList<String>(); |
| 414 | |
| 415 | while (iterator.hasNext()) { |
| 416 | result.add(iterator.next()); |
| 417 | } |
| 418 | |
| 419 | return Collections.unmodifiableList(result); |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * Returns a {@code MapSplitter} which splits entries based on this splitter, and splits entries |
nothing calls this directly
no test coverage detected