public abstract class Iterables extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Iterables.Cached<A> |
static class |
Iterables.FilterIterable<A> |
static class |
Iterables.FilterTest |
Modifier and Type | Field and Description |
---|---|
static Operator |
unfoldOperator |
Modifier and Type | Method and Description |
---|---|
static <A,B> boolean |
allZip(Relation<? super A,? super B> rel,
Iterable<? extends A> left,
Iterable<? extends B> right) |
static <A,B> boolean |
anyZip(Relation<? 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> Iterables.Cached<A> |
cache(Iterable<A> things) |
static <A,B> Iterable<B> |
comprehend(Iterable<? extends A> gen,
Function<? super A,? extends Iterable<? extends B>> map) |
static <A,B> Iterable<B> |
comprehend(Iterable<? extends A> gen,
Predicate<? super A> filter,
Function<? super A,? extends B> map) |
static <A> Iterable<A> |
concat(Iterable<? extends A> first,
Iterable<? extends A> second) |
static <A> Iterable<A> |
cons(A first,
Iterable<? extends A> rest) |
static <A> Iterable<A> |
drop(int offset,
Iterable<A> things) |
static <A> Iterable<A> |
dropTake(int offset,
int length,
Iterable<A> things) |
static <A> void |
elementwise(Sink<? super A> sink,
Iterable<A> things) |
static <A> Iterable<A> |
empty() |
static Iterable<BigInteger> |
factor(BigInteger n) |
static <A> Iterable<A> |
filter(Predicate<? super A> pred,
Iterable<? extends A> things) |
static <A,B> Iterable<A> |
filterWithConstraint(Relation<? super A,? super B> rel,
Iterable<A> things,
Iterable<B> constraints) |
static <A> Iterable<A> |
flatten(Iterable<? extends Iterable<? extends A>> items) |
static <D,S> S |
fold(Consumer<? super D,S> consumer,
S initialState,
Iterable<? extends D> things) |
static <A,M> M |
fold(GenMonoid<? super A,M> monoid,
Iterable<? extends A> things) |
static <A,M> M |
fold(GenSemigroup<? super A,M> semi,
Iterable<? extends A> things) |
static <D,S> S |
fold(InitConsumer<? super D,S> consumer,
Iterable<? extends D> things) |
static <A> Function<Iterable<A>,Iterator<A>> |
iterator() |
static <A> Iterable<A> |
loop(A init,
Predicate<? super A> cond,
Function<? super A,? extends A> iter) |
static void |
main(String[] args) |
static <A,B,C> Map<A,C> |
makeIndex(Function<? super B,? extends A> fun,
GenSemigroup<? super B,C> sgrp,
Iterable<? extends B> things) |
static <A,B> Iterable<B> |
map(Function<? super A,? extends B> fun,
Iterable<? extends A> things) |
static <A> Iterable<A> |
merge(Comparator<? super A> order,
boolean removeDuplicates,
Iterable<? extends A> left,
Iterable<? extends A> right) |
static <A> Iterable<A> |
next(Iterable<A> things) |
static <A> Iterable<A> |
nothing() |
static <A> void |
pairwise(PairSink<? super A,? super A> sink,
Iterable<A> things) |
static <A,B> void |
parallel(PairSink<? super A,? super B> sink,
Iterable<A> things,
Iterable<B> more) |
static Iterable<BigInteger> |
primes() |
static <A> Iterable<A> |
singleton(A item) |
static <A> Iterable<A> |
take(int length,
Iterable<A> things) |
static <R,S> Function<InitProducer<? extends R,S>,Iterable<R>> |
unfold() |
static <R,S> Iterable<R> |
unfold(InitProducer<? extends R,S> p) |
public static final Operator unfoldOperator
public static <A> Iterable<A> empty()
public static <A,B> Iterable<B> map(Function<? super A,? extends B> fun, Iterable<? extends A> things)
public static <R,S> Iterable<R> unfold(InitProducer<? extends R,S> p)
public static <R,S> Function<InitProducer<? extends R,S>,Iterable<R>> unfold()
public static <A,M> M fold(GenSemigroup<? super A,M> semi, Iterable<? extends A> things)
public static <D,S> S fold(InitConsumer<? super D,S> consumer, Iterable<? extends D> things)
public static <D,S> S fold(Consumer<? super D,S> consumer, S initialState, Iterable<? extends D> things)
public static <A> Iterable<A> singleton(A item)
public static <A> Iterable<A> concat(Iterable<? extends A> first, Iterable<? extends A> second)
public static <A> Iterable<A> loop(A init, Predicate<? super A> cond, Function<? super A,? extends A> iter)
public static <A> Iterable<A> filter(Predicate<? super A> pred, Iterable<? extends A> things)
public static <A,B> Iterable<B> comprehend(Iterable<? extends A> gen, Predicate<? super A> filter, Function<? super A,? extends B> map)
public static <A,B> Iterable<B> comprehend(Iterable<? extends A> gen, Function<? super A,? extends Iterable<? extends B>> map)
public static <A> Iterables.Cached<A> cache(Iterable<A> things)
public static <A,B> boolean allZip(Relation<? super A,? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right)
public static <A,B> boolean anyZip(Relation<? super A,? super B> rel, Iterable<? extends A> left, Iterable<? extends B> right)
public static <A,B,C> Iterable<C> asProduct(BiFunction<? super A,? super B,? extends C> fun, Iterable<? extends A> left, Iterable<? extends B> right)
public static <A,B,C> Map<A,C> makeIndex(Function<? super B,? extends A> fun, GenSemigroup<? super B,C> sgrp, Iterable<? extends B> things)
public static <A> Iterable<A> nothing()
public static Iterable<BigInteger> primes()
public static Iterable<BigInteger> factor(BigInteger n)
public static void main(String[] args)
public static <A> Iterable<A> merge(Comparator<? super A> order, boolean removeDuplicates, Iterable<? extends A> left, Iterable<? extends A> right)
public static <A,B> Iterable<A> filterWithConstraint(Relation<? super A,? super B> rel, Iterable<A> things, Iterable<B> constraints)
see also the complete user documentation .