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

Method transform

corpus/java/training/guava/collect/Iterables.java:685–695  ·  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

683 * Collections2#transform}.
684 */
685 public static <F, T> Iterable<T> transform(
686 final Iterable<F> fromIterable, final Function<? super F, ? extends T> function) {
687 checkNotNull(fromIterable);
688 checkNotNull(function);
689 return new FluentIterable<T>() {
690 @Override
691 public Iterator<T> iterator() {
692 return Iterators.transform(fromIterable.iterator(), function);
693 }
694 };
695 }
696
697 /**
698 * 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