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

Method transform

output/java_guava/1.4.16/Iterables.java:741–751  ·  view source on GitHub ↗

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

(
    final Iterable<F> fromIterable, final Function<? super F, ? extends T> function)

Source from the content-addressed store, hash-verified

739
740
741 public static <F, T> Iterable<T> transform(
742 final Iterable<F> fromIterable, final Function<? super F, ? extends T> function) {
743 checkNotNull(fromIterable);
744 checkNotNull(function);
745 return new FluentIterable<T>() {
746 @Override
747 public Iterator<T> iterator() {
748 return Iterators.transform(fromIterable.iterator(), function);
749 }
750 };
751 }
752
753 /**
754 * Returns the element at the specified position in an iterable.

Callers 5

iteratorMethod · 0.95
toStringImplMethod · 0.95
iteratorMethod · 0.95
transformMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected