Package eu.bandm.tools.util.java
Class Iterables
java.lang.Object
eu.bandm.tools.util.java.Iterables
Library of constants and combinators for classes implementing
Iterable
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,
B> boolean allZip
(BiPredicate<? super A, ? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right) static <A,
B> boolean anyZip
(BiPredicate<? super A, ? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right) static <A,
B, C> Iterable<C> asProduct
(BiFunction<? super A, ? super B, ? extends C> fun, Iterable<? extends A> left, Iterable<? extends B> right) static <A,
B> Iterable<B> static <A> Iterables.Cached<A>
static <A,
B> Iterable<B> comprehend
(Iterable<A> gen, Function<? super A, ? extends Iterable<? extends B>> map) Deprecated.use streams insteadstatic <A,
B> Iterable<B> comprehend
(Iterable<A> gen, Predicate<? super A> filter, Function<? super A, ? extends B> map) Deprecated.use streams insteadstatic <A> Iterable<A>
static <A> Iterable<A>
static <A> Iterable<A>
static <A> Iterable<A>
static <A> void
elementwise
(Consumer<? super A> sink, Iterable<A> things) static <A> Iterable<A>
empty()
static Iterable<BigInteger>
factor
(BigInteger n) static <A> Iterable<A>
static <A,
B> Iterable<A> filterWithConstraint
(BiPredicate<? super A, ? super B> rel, Iterable<A> things, Iterable<B> constraints) static <A> Iterable<A>
static <A,
B> Iterable<B> static <A> Iterable<A>
merge
(Comparator<? super A> order, boolean removeDuplicates, Iterable<? extends A> left, Iterable<? extends A> right) static <A> Iterable<A>
static Iterable<BigInteger>
primes()
static <A> Iterable<A>
singleton
(A item) static <A> Iterable<A>
-
Method Details
-
empty
-
map
-
singleton
-
flatten
-
bind
-
cons
-
concat
-
filter
-
comprehend
@Deprecated(since="0.0") public static <A,B> Iterable<B> comprehend(Iterable<A> gen, Predicate<? super A> filter, Function<? super A, ? extends B> map) Deprecated.use streams insteadFirst apply filter, than map, and collect results. -
comprehend
@Deprecated(since="0.0") public static <A,B> Iterable<B> comprehend(Iterable<A> gen, Function<? super A, ? extends Iterable<? extends B>> map) Deprecated.use streams insteadApply function and collect results. -
cache
-
next
-
allZip
public static <A,B> boolean allZip(BiPredicate<? super A, ? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right) -
anyZip
public static <A,B> boolean anyZip(BiPredicate<? super A, ? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right) -
asProduct
public static <A,B, Iterable<C> asProductC> (BiFunction<? super A, ? super B, ? extends C> fun, Iterable<? extends A> left, Iterable<? extends B> right) -
primes
-
factor
-
merge
public static <A> Iterable<A> merge(Comparator<? super A> order, boolean removeDuplicates, Iterable<? extends A> left, Iterable<? extends A> right) -
filterWithConstraint
public static <A,B> Iterable<A> filterWithConstraint(BiPredicate<? super A, ? super B> rel, Iterable<A> things, Iterable<B> constraints) -
drop
-
take
-
dropTake
-
elementwise
-