@Override public <V> LazyIterable<V> flatCollect(Function<? super T, ? extends Iterable<V>> function) { return LazyIterate.flatCollect(this.adapted, function); }
public <V> LazyIterable<V> flatCollect(Function<? super T, ? extends Iterable<V>> function) { return LazyIterate.flatCollect(this, function); }
public static <A, B> LazyIterable<Pair<A, B>> cartesianProduct(Set<A> set1, final Set<B> set2) { return LazyIterate.flatCollect(set1, new Function<A, LazyIterable<Pair<A, B>>>() { public LazyIterable<Pair<A, B>> valueOf(final A first) { return LazyIterate.collect(set2, new Function<B, Pair<A, B>>() { public Pair<A, B> valueOf(B second) { return Tuples.pair(first, second); } }); } }); } }
public static <A, B> LazyIterable<Pair<A, B>> cartesianProduct(SetIterable<A> set1, final SetIterable<B> set2) { return LazyIterate.flatCollect(set1, new Function<A, LazyIterable<Pair<A, B>>>() { public LazyIterable<Pair<A, B>> valueOf(final A first) { return LazyIterate.collect(set2, new Function<B, Pair<A, B>>() { public Pair<A, B> valueOf(B second) { return Tuples.pair(first, second); } }); } }); } }
@Override public <V> LazyIterable<V> flatCollect(Function<? super T, ? extends Iterable<V>> function) { return LazyIterate.flatCollect(this.adapted, function); }
public <V> LazyIterable<V> flatCollect(Function<? super T, ? extends Iterable<V>> function) { return LazyIterate.flatCollect(this, function); }
public static <A, B> LazyIterable<Pair<A, B>> cartesianProduct(Set<A> set1, final Set<B> set2) { return LazyIterate.flatCollect(set1, new Function<A, LazyIterable<Pair<A, B>>>() { public LazyIterable<Pair<A, B>> valueOf(final A first) { return LazyIterate.collect(set2, new Function<B, Pair<A, B>>() { public Pair<A, B> valueOf(B second) { return Tuples.pair(first, second); } }); } }); } }
public static <A, B> LazyIterable<Pair<A, B>> cartesianProduct(SetIterable<A> set1, final SetIterable<B> set2) { return LazyIterate.flatCollect(set1, new Function<A, LazyIterable<Pair<A, B>>>() { public LazyIterable<Pair<A, B>> valueOf(final A first) { return LazyIterate.collect(set2, new Function<B, Pair<A, B>>() { public Pair<A, B> valueOf(B second) { return Tuples.pair(first, second); } }); } }); } }