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

Method transform

output/java_guava/1.4.16/Iterators.java:791–799  ·  view source on GitHub ↗

Returns a view containing the result of applying function to each element of fromIterator. The returned iterator supports remove() if fromIterator does. After a successful remove() call, fromIterator no longer contains the corresponding element.

(final Iterator<F> fromIterator, final Function<? super F, ? extends T> function)

Source from the content-addressed store, hash-verified

789
790
791 public static <F, T> Iterator<T> transform(final Iterator<F> fromIterator, final Function<? super F, ? extends T> function) {
792 checkNotNull(function);
793 return new TransformedIterator<F, T>(fromIterator) {
794 @Override
795 T transform(F from) {
796 return function.apply(from);
797 }
798 };
799 }
800
801 /**
802 * Advances {@code iterator} {@code position + 1} times, returning the

Callers 9

keyIteratorMethod · 0.95
valueIteratorMethod · 0.95
entryIteratorMethod · 0.95
iteratorMethod · 0.95
transformEntriesMethod · 0.95
iteratorMethod · 0.95
entryIteratorMethod · 0.95
cellIteratorMethod · 0.95
cellIteratorMethod · 0.95

Calls 2

applyMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected