@Override public Iterator<R> iterator() { return apply(mapping, coll.iterator()); }
/** * Applies a mapping to an iterable. The result is an iterable whose iterator returns the results of applying the * specified mapping to each of the elements returned by the original iterable. * * @param <D> * domain class. * @param <R> * range clas. * @param mapping * the mapping to apply. * @param it * the underlying iterable. * * @return the mapped iterable. */ public static <D, R> Iterable<R> apply(final Mapping<? super D, R> mapping, final Iterable<? extends D> it) { return () -> apply(mapping, it.iterator()); }