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

Method transform

output/java_guava/1.4.17/Lists.java:575–579  ·  view source on GitHub ↗

Returns a list that applies function to each element of fromList. The returned list is a transformed view of fromList; changes to fromList will be reflected in the returned list and vice versa. Since functions are not reversible, the transform is one-way and new i

(List<F> fromList, Function<? super F, ? extends T> function)

Source from the content-addressed store, hash-verified

573
574
575 public static <F, T> List<T> transform(List<F> fromList, Function<? super F, ? extends T> function) {
576 return (fromList instanceof RandomAccess)
577 ? new TransformingRandomAccessList<F, T>(fromList, function)
578 : new TransformingSequentialList<F, T>(fromList, function);
579 }
580
581 /**
582 * Implementation of a sequential transforming list.

Callers 6

transformMethod · 0.95
transformMethod · 0.95
binarySearchMethod · 0.95
visitTerminalMethod · 0.45
previousMethod · 0.45
toStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected