MCPcopy Create free account
hub / github.com/antlr/codebuff / splitToList

Method splitToList

output/java_guava/1.4.17/Splitter.java:421–430  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

splittingIteratorMethod · 0.95
addMethod · 0.65
nextMethod · 0.65
checkNotNullMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected