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
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A,
B> boolean allZip
(BiPredicate<? super A, ? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right) static <E> Optional
<E> 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) Deprecated, for removal: This API element is subject to removal in a future version.use streams instead.static <A,
B> Iterable <B> Deprecated, for removal: This API element is subject to removal in a future version.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) Deprecated, for removal: This API element is subject to removal in a future version.static <A> Iterable
<A> empty()
static <A> Iterable
<A> static <A,
B> Iterable <A> filterWithConstraint
(BiPredicate<? super A, ? super B> rel, Iterable<A> things, Iterable<B> constraints) static <E> Optional
<E> static <A,
B> Iterable <B> 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 <E> Iterable
<E> of
(E... things) static <A> Iterable
<A> singleton
(A item) static <A> Iterable
<A>
-
Method Details
-
empty
-
map
-
singleton
-
of
-
flatten
-
bind
@Deprecated(forRemoval=true, since="1.0") public static <A,B> Iterable<B> bind(Function<? super A, ? extends Iterable<? extends B>> fun, Iterable<A> items) Deprecated, for removal: This API element is subject to removal in a future version. -
flatMap
-
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
@Deprecated(forRemoval=true, since="1.0") public static <A,B, Iterable<C> asProductC> (BiFunction<? super A, ? super B, ? extends C> fun, Iterable<? extends A> left, Iterable<? extends B> right) Deprecated, for removal: This API element is subject to removal in a future version.use streams instead. -
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
@Deprecated(forRemoval=true, since="1.0") public static <A> void elementwise(Consumer<? super A> sink, Iterable<A> things) Deprecated, for removal: This API element is subject to removal in a future version. -
anyOf
-
firstOf
-
filter(java.util.function.Predicate<? super A>, java.lang.Iterable<A>)
instead.