| Modifier and Type | Class and Description |
|---|---|
(package private) class |
AbstractEnumerator<E>
Abstract implementation of the
Enumerator interface. |
(package private) class |
ArrayEnumerator<E>
Enumerator implementation for arrays. |
(package private) class |
CacheEnumerator<E>
Enumerator over cached enumerated elements. |
(package private) class |
ChoiceEnumerator<E>
Enumerator implementation that enumerates by choosing among the
elements of given source Iterator instances. |
(package private) class |
EnumerationEnumerator<E>
Enumerator encapsulating an Enumeration. |
class |
IntRangeEnumerator
Enumerator and PrimitiveIterator.OfInt enumerating
over a range of integers. |
(package private) class |
IteratorEnumerator<E>
Enumerator encapsulating an Iterator. |
class |
LateBindingEnumerator<E>
Enumerator whose source of elements can be defined after
construction. |
(package private) class |
LazyEnumerator<E>
Enumerator that retrieves its source of elements lazily. |
class |
LongRangeEnumerator
Enumerator and PrimitiveIterator.OfLong enumerating
over a range of long integers. |
(package private) class |
PipeEnumerator<E>
Implementation of highly composable enumerators.
|
(package private) class |
PipeSource<E>
IteratorEnumerator that acts as a source of enumerated
elements for AbstractPipeProcessor instances within
PipeEnumerator.pipeline. |
class |
ShareableEnumerator<E>
Enumerator with support for element sharing. |
(package private) class |
SharingEnumerator<E>
Enumerator sharing the elements of a common
ShareableEnumerator. |
(package private) class |
SuppliedEnumerator<E>
Enumerator over optional elements given by a Supplier. |
(package private) class |
TolerantEnumerator<E>
Enumerator that continues enumeration even in presence of errors by
passing them to an error handler. |
| Modifier and Type | Method and Description |
|---|---|
default Enumerator<E> |
Enumerator.append(E... elements)
Appends the provided elements to the end of the current enumerator.
|
Enumerator<E> |
PipeOperator.apply(Enumerator<T> enumerator) |
default <T> Enumerator<T> |
Enumerator.as(Class<T> clazz)
Casts the current enumerator to an enumerator of a different parameter
type.
|
default <T> Enumerator<T> |
Enumerator.asFiltered(Class<T> clazz)
Casts the current enumerator to a different parameter type and filters
the enumerated elements based on that type.
|
default Enumerator<Optional<E>> |
Enumerator.asOptional()
Returns an infinite enumerator of non-empty
Optional instances
containing the current elements as long as they last or empty
Optional instances if the current enumerator has no more
elements. |
default Enumerator<E> |
Enumerator.asTolerant(Consumer<? super Exception> handler)
Returns a fault-tolerant enumerator with no retries.
|
default Enumerator<E> |
Enumerator.asTolerant(Consumer<? super Exception> handler,
int retries)
Returns a fault-tolerant enumerator with retries.
|
static <E> Enumerator<E> |
Enumerator.choiceOf(IntSupplier indexSupplier,
IntUnaryOperator altIndexSupplier,
Iterator<E> first,
Iterator<? extends E> second,
Iterator<? extends E>... rest)
Returns an enumerator that chooses elements from the provided iterators.
|
static <E> Enumerator<E> |
Enumerator.choiceOf(IntSupplier indexSupplier,
Iterator<E> first,
Iterator<? extends E> second,
Iterator<? extends E>... rest)
Returns an enumerator that chooses elements from the provided iterators.
|
default Enumerator<E> |
Enumerator.concat(Enumeration<? extends E> elements)
Concatenates the current enumerator with the provided
Enumeration. |
default Enumerator<E> |
Enumerator.concat(Iterable<? extends E> elements)
Concatenates the current enumerator with the provided
Iterable. |
Enumerator<E> |
PipeEnumerator.concat(Iterator<? extends E> elements) |
default Enumerator<E> |
Enumerator.concat(Iterator<? extends E> elements)
Concatenates the current enumerator with the provided
Iterator. |
default Enumerator<E> |
Enumerator.concat(Spliterator<? extends E> elements)
Concatenates the current enumerator with the provided sequential
Spliterator. |
default Enumerator<E> |
Enumerator.concat(Stream<? extends E> elements)
Concatenates the current enumerator with the provided sequential
Stream. |
default Enumerator<E> |
Enumerator.concat(Supplier<Optional<E>> elements)
Concatenates the current enumerator with the sequence formed of
the elements supplied by the provided
Supplier. |
default Enumerator<E> |
Enumerator.concatOn(E... elements)
Concatenates the current enumerator with the sequence formed of the
provided elements
|
default Enumerator<E> |
Enumerator.distinct()
Returns an enumerator containing the elements of the current enumerator
in the same order by without duplicates.
|
static <E> Enumerator<E> |
Reversible.distinct(Enumerator<E> source,
boolean reversed)
Applies a
Enumerator.distinct() operation upon source,
in reverse if necessary. |
static <E> Enumerator<E> |
Enumerator.empty()
Returns en enumerator with no elements.
|
protected Enumerator<E> |
PipeEnumerator.enqueueFilterProcessor(Predicate<? super E> filter)
Enqueues the given filter by aggregating it with the last predicates,
if possible.
|
protected <X> Enumerator<X> |
PipeEnumerator.enqueueMapProcessor(Function<? super E,? extends X> mapper)
Enqueues the given mapper by aggregating it with the last mappers,
if possible.
|
protected <X> Enumerator<X> |
PipeEnumerator.enqueueProcessor(AbstractPipeMultiProcessor<? super E,? extends X> processor)
Adds the given
processor to the back of the multi-pipeline. |
protected <X> Enumerator<X> |
PipeEnumerator.enqueueProcessor(AbstractPipeProcessor<? super E,? extends X> processor)
Adds the given
processor to the back of the pipeline. |
Enumerator<E> |
Enumerable.enumerator()
Returns a new
Enumerator instance that enumerates over the
current Enumerable. |
Enumerator<E> |
CachedEnumerableState.enumerator()
Gets an
Enumerator instance that enumerates over the cached
elements if caching is enabled or over the source Enumerable
if caching is disabled. |
Enumerator<E> |
AbstractEnumerable.enumerator() |
Enumerator<E> |
PipeEnumerator.filter(Predicate<? super E> predicate) |
default Enumerator<E> |
Enumerator.filter(Predicate<? super E> predicate)
Returns an enumerator consisting of the elements of the current
enumerator that match the provided predicate.
|
<R> Enumerator<R> |
PipeEnumerator.flatMap(Function<? super E,? extends Iterator<? extends R>> mapper) |
default <R> Enumerator<R> |
Enumerator.flatMap(Function<? super E,? extends Iterator<? extends R>> mapper)
Returns an enumerator consisting of the results of replacing each
enumerated element with the content of a mapped enumerator obtained
by applying the provided mapper on each enumerated element.
|
protected Enumerator<E> |
EnumeratorEnumerable.getSource()
Gets the the internal
source. |
protected Enumerator<E> |
SuppliedEnumerable.internalEnumerator() |
protected Enumerator<E> |
PipeEnumerable.internalEnumerator() |
protected Enumerator<E> |
OnceEnumerable.internalEnumerator() |
protected Enumerator<E> |
LazyEnumerable.internalEnumerator() |
protected Enumerator<E> |
LateBindingEnumerable.internalEnumerator() |
protected Enumerator<E> |
IterableEnumerable.internalEnumerator() |
protected Enumerator<E> |
EnumeratorEnumerable.internalEnumerator() |
protected Enumerator<E> |
ChoiceEnumerable.internalEnumerator() |
protected Enumerator<E> |
CachedEnumerable.internalEnumerator() |
protected abstract Enumerator<E> |
AbstractEnumerable.internalEnumerator()
Yields a new
Enumerator for the current Enumerable. |
static <E> Enumerator<E> |
Enumerator.iterate(E seed,
UnaryOperator<E> f)
Returns an infinite enumerator obtained by applying repeatedly the
provided unary operator.
|
Enumerator<E> |
PipeEnumerator.limit(long maxSize) |
default Enumerator<E> |
Enumerator.limit(long maxSize)
Returns the current enumerator truncated to the given size.
|
default Enumerator<E> |
Enumerator.limitWhile(Predicate<? super E> predicate)
Returns an enumerator enumerating over the elements of the current
enumerator while stopping at the first element that does not match
the provided predicate.
|
default <R> Enumerator<R> |
Enumerator.map(BiFunction<? super E,? super Long,? extends R> mapper)
Returns an enumerator consisting of the results of applying the
provided function on the enumerated elements.
|
(package private) static <E,R> Enumerator<R> |
Reversible.map(Enumerator<E> source,
BiFunction<? super E,? super Long,? extends R> mapper,
boolean reversed)
Applies a
Enumerator.map(BiFunction) operation
upon source, in reverse if necessary. |
default <R> Enumerator<R> |
Enumerator.map(Function<? super E,? extends R> mapper)
Returns an enumerator consisting of the results of applying the given
function on the enumerated elements.
|
<X> Enumerator<X> |
PipeEnumerator.map(Function<? super E,? extends X> mapper) |
static <E> Enumerator<E> |
Enumerator.of(E[] elements)
Returns an enumerator iterating over the given array.
|
static <E> Enumerator<E> |
Enumerator.of(Enumeration<E> source)
Returns an enumerator enumerating over the elements of an
existing
Enumeration. |
static <E> Enumerator<E> |
Enumerator.of(Iterable<E> source)
Returns an enumerator enumerating over the elements of an
existing
Iterable. |
static <E> Enumerator<E> |
Enumerator.of(Iterator<E> source)
Returns an enumerator enumerating over an existing
Iterator. |
(package private) static <T> Enumerator<T> |
IteratorEnumerator.of(Iterator<T> source)
Constructs an
Enumerator from an Iterator. |
static <E> Enumerator<E> |
Enumerator.of(Spliterator<E> source)
Returns an enumerator enumerating over the elements of an existing
Spliterator. |
static <E> Enumerator<E> |
Enumerator.of(Stream<E> source)
Returns an enumerator enumerating over the elements of an existing
Stream. |
static <E> Enumerator<E> |
Enumerator.of(Supplier<Optional<E>> source)
Returns an enumerator enumerating over the elements supplied by an
existing
Supplier. |
static <E> Enumerator<E> |
Enumerator.ofLazyEnumeration(Supplier<? extends Enumeration<E>> source)
Returns an enumerator enumerating over an
Enumeration supplied
lazily. |
static <E> Enumerator<E> |
Enumerator.ofLazyIterable(Supplier<? extends Iterable<E>> source)
Returns an enumerator enumerating over an
Iterable supplied
lazily. |
static <E> Enumerator<E> |
Enumerator.ofLazyIterator(Supplier<? extends Iterator<E>> source)
Returns an enumerator enumerating over an
Iterator supplied
lazily. |
static <E> Enumerator<E> |
Enumerator.ofLazySpliterator(Supplier<? extends Spliterator<E>> source)
Returns an enumerator enumerating over a
Spliterator supplied
lazily. |
static <E> Enumerator<E> |
Enumerator.ofLazyStream(Supplier<? extends Stream<E>> source)
Returns an enumerator enumerating over a
Stream supplied lazily. |
static <E> Enumerator<E> |
Enumerator.on(E... elements)
Returns an enumerator returning the given elements.
|
default Enumerator<E> |
Enumerator.peek(Consumer<? super E> action)
Returns an enumerator with the same enumerated elements as the current
stream, additionally performing the provided action on each enumerated
element.
|
static <E> Enumerator<E> |
Reversible.peek(Enumerator<E> source,
Consumer<? super E> action,
boolean reversed)
Applies a
Enumerator.peek(Consumer) operation
upon source, in reverse if necessary. |
default Enumerator<E> |
Enumerator.prepend(Enumeration<? extends E> elements)
Prepends the current enumerator with the provided
Enumeration. |
default Enumerator<E> |
Enumerator.prepend(Iterable<? extends E> elements)
Prepends the current enumerator with the provided
Iterable. |
Enumerator<E> |
PipeEnumerator.prepend(Iterator<? extends E> elements) |
default Enumerator<E> |
Enumerator.prepend(Iterator<? extends E> elements)
Prepends the current enumerator with the provided
Iterator. |
default Enumerator<E> |
Enumerator.prepend(Spliterator<? extends E> elements)
Prepends the current enumerator with the provided sequential
Spliterator. |
default Enumerator<E> |
Enumerator.prepend(Stream<? extends E> elements)
Prepends the current enumerator with the provided sequential
Stream. |
default Enumerator<E> |
Enumerator.prepend(Supplier<Optional<E>> elements)
Prepends the current enumerator with the sequence formed of
the elements supplied by the provided
Supplier. |
default Enumerator<E> |
Enumerator.prependOn(E... elements)
Prepends the current enumerator with the sequence formed of the provided
elements.
|
static <E> Enumerator<E> |
Enumerator.range(E startInclusive,
E endExclusive,
UnaryOperator<E> succ,
Comparator<? super E> cmp)
Returns an enumerator enumerating over an ordered sequence between
a start and an exclusive end.
|
static <E> Enumerator<E> |
Enumerator.rangeClosed(E startInclusive,
E endInclusive,
UnaryOperator<E> succ,
Comparator<? super E> cmp)
Returns an enumerator enumerating over an ordered sequence between
a start and an inclusive end.
|
static <E> Enumerator<E> |
Enumerator.repeat(E element,
long count)
Returns an enumerator that enumerates the same element the given number
of times.
|
default Enumerator<E> |
Enumerator.repeatAll(int count)
Returns an enumerator that keeps enumerating over the current sequence,
a given number of times.
|
static <E> Enumerator<E> |
Enumerator.repeatAll(Supplier<Iterator<E>> source,
long count)
Returns an enumerator that enumerates over the iterator supplied lazily
the given number of times.
|
default Enumerator<E> |
Enumerator.repeatEach(int count)
Enumerates over the elements of the current enumerator the given number
of times.
|
default Enumerator<E> |
Enumerator.reverse()
Returns an enumerator that reverses the order of the enumerated elements.
|
Enumerator<E> |
PipeEnumerator.reversedLimit(long maxSize)
Adds a limit processor at the front of
pipeline. |
Enumerator<E> |
PipeEnumerator.reversedSkip(long n)
Adds a skip processor at the front of
pipeline. |
Enumerator<E> |
ShareableEnumerator.share()
Creates an
Enumerator instance that will share the
elements of the current enumerator. |
Enumerator<E>[] |
ShareableEnumerator.share(int count)
Creates an array of
Enumerator instances that will share
the elements of the current enumerator. |
Enumerator<E> |
PipeEnumerator.skip(long n) |
default Enumerator<E> |
Enumerator.skip(long n)
Returns the current enumerator with the given number of front elements
dropped.
|
Enumerator<E> |
PipeEnumerator.skipWhile(Predicate<? super E> predicate) |
default Enumerator<E> |
Enumerator.skipWhile(Predicate<? super E> predicate)
Returns the current enumerator with front elements dropped as long as
they match a given predicate.
|
default Enumerator<E> |
Enumerator.sorted()
Returns an enumerator the sorts the enumerated elements.
|
default Enumerator<E> |
Enumerator.sorted(Comparator<? super E> comparator)
Returns an enumerator that sorts the current elements according to the
given comparator.
|
default Enumerator<E> |
Enumerator.take(long n)
Returns the current enumerator truncated to the given size.
|
Enumerator<E> |
PipeEnumerator.takeWhile(Predicate<? super E> predicate) |
default Enumerator<E> |
Enumerator.takeWhile(Predicate<? super E> predicate)
Returns an enumerator enumerating over the elements of the current
enumerator while stopping at the first element that does not match
the provided predicate.
|
default Enumerator<E> |
Enumerator.union(Enumeration<? extends E> others)
Returns an enumerator enumerating over the current enumerator and
the provided
Enumeration, all duplicates removed. |
default Enumerator<E> |
Enumerator.union(Iterable<? extends E> others)
Returns an enumerator enumerating over the current enumerator and
the provided
Iterable, all duplicates removed. |
default Enumerator<E> |
Enumerator.union(Iterator<? extends E> others)
Returns an enumerator enumerating over the current enumerator and
the provided enumerator, all duplicates removed.
|
default Enumerator<E> |
Enumerator.union(Spliterator<? extends E> others)
Returns an enumerator enumerating over the current enumerator and
the provided
Spliterator, all duplicates removed. |
default Enumerator<E> |
Enumerator.union(Stream<? extends E> others)
Returns an enumerator enumerating over the current enumerator and
the provided
Stream, all duplicates removed. |
default Enumerator<E> |
Enumerator.union(Supplier<Optional<E>> others)
Returns an enumerator enumerating over the current enumerator and
the elements supplied by the provided
Supplier, all duplicates
removed. |
default Enumerator<E> |
Enumerator.unionOn(E... others)
Returns an enumerator enumerating over the current enumerator
and the given elements, all duplicates removed.
|
Enumerator<Optional<E>[]> |
PipeEnumerator.zipAll(Iterator<? extends E> first,
Iterator<? extends E>... rest) |
default Enumerator<Optional<E>[]> |
Enumerator.zipAll(Iterator<? extends E> first,
Iterator<? extends E>... rest)
Returns an enumerator consisting of an array of
Optional
objects containing elements from the current enumerator and
the given Iterator instances, while any has elements. |
Enumerator<Optional<E>[]> |
PipeEnumerator.zipAll(Iterator<E> first,
List<Iterator<E>> rest)
Zips the elements of the
first Iterator with the
elements of the rest of iterators. |
default <T> Enumerator<Pair<Optional<E>,Optional<T>>> |
Enumerator.zipAny(Iterator<T> elements)
Returns an enumerator consisting of pairs of elements from the
current enumerator and the given
Iterator, while any
of them has elements. |
default <T> Enumerator<Pair<E,T>> |
Enumerator.zipBoth(Iterator<T> elements)
Returns an enumerator consisting of pairs of elements from the
current enumerator and the given
Iterator, while both
have elements. |
default <T> Enumerator<Pair<E,Optional<T>>> |
Enumerator.zipLeft(Iterator<T> elements)
Returns an enumerator consisting of pairs of elements from the
current enumerator and the given
Iterator, while the current
enumerator has elements. |
default <T> Enumerator<Pair<Optional<E>,T>> |
Enumerator.zipRight(Iterator<T> elements)
Returns an enumerator consisting of pairs of elements from the
current enumerator and the given
Iterator, while the provided
iterator has elements. |
| Modifier and Type | Method and Description |
|---|---|
Enumerator<E> |
PipeOperator.apply(Enumerator<T> enumerator) |
static <E> Enumerator<E> |
Reversible.distinct(Enumerator<E> source,
boolean reversed)
Applies a
Enumerator.distinct() operation upon source,
in reverse if necessary. |
static void |
Checks.ensureNonEnumerating(Enumerator<?> enumerator)
Checks that an
enumerator is not enumerating. |
(package private) static <E,R> Enumerator<R> |
Reversible.map(Enumerator<E> source,
BiFunction<? super E,? super Long,? extends R> mapper,
boolean reversed)
Applies a
Enumerator.map(BiFunction) operation
upon source, in reverse if necessary. |
static <E> Enumerator<E> |
Reversible.peek(Enumerator<E> source,
Consumer<? super E> action,
boolean reversed)
Applies a
Enumerator.peek(Consumer) operation
upon source, in reverse if necessary. |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> PipeEnumerable<T,E> |
PipeEnumerable.of(Iterable<? extends T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Creates a
PipeEnumerable instance with the given source,
operator and once only flag. |
static <T,E> PipeEnumerable<T,E> |
PipeEnumerable.of(Iterable<? extends T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Creates a
PipeEnumerable instance with the given source,
operator and once only flag. |
| Constructor and Description |
|---|
PipeEnumerator(Enumerator<E> source)
Creates a new
PipeEnumerator instance based on the given
source Enumerator. |
SharingEnumerator(ShareableEnumerator<E> sharedSource,
Enumerator<E> cachedSource)
Creates a
SharingEnumerator instance that shares the elements
of sharedSource via cachedSource. |
TolerantEnumerator(Enumerator<E> source,
Consumer<? super Exception> handler,
int retries)
Creates a
TolerantEnumerator that enumerates over the given
source and handles errors by calling the given error
handler a given number of times. |
| Constructor and Description |
|---|
PipeEnumerable(Iterable<T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Constructs a
PipeEnumerable using a regular Iterable
as a link. |
PipeEnumerable(Iterable<T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Constructs a
PipeEnumerable using a regular Iterable
as a link. |
PipeEnumerable(PipeEnumerable<?,T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Constructs a
PipeEnumerable using a Enumerable as a link. |
PipeEnumerable(PipeEnumerable<?,T> source,
Function<Enumerator<E>,Enumerator<T>> operator,
Supplier<Boolean> onceOnly)
Constructs a
PipeEnumerable using a Enumerable as a link. |
PipeOperator(Function<Enumerator<T>,Enumerator<E>> operator,
Supplier<Boolean> onceOnly)
Creates a
PipeOperator instance with the given operator
and onceOnly flag. |
PipeOperator(Function<Enumerator<T>,Enumerator<E>> operator,
Supplier<Boolean> onceOnly)
Creates a
PipeOperator instance with the given operator
and onceOnly flag. |
SuppliedEnumerable(Supplier<Enumerator<E>> supplier)
Constructs a
SuppliedEnumerable instance. |
Copyright © 2016. All rights reserved.