E - Type of enumerated elements.final class ChoiceEnumerable<E> extends AbstractEnumerable<E>
Enumerable that chooses among the elements of the given
Iterator instances.| Constructor and Description |
|---|
ChoiceEnumerable(Supplier<IntSupplier> indexSupplier,
Supplier<IntUnaryOperator> nextIndexSupplier,
Iterable<E> first,
Iterable<? extends E> second,
List<Iterable<E>> rest)
Constructs a
ChoiceEnumerable instance. |
| Modifier and Type | Method and Description |
|---|---|
protected Enumerator<E> |
internalEnumerator()
Yields a new
Enumerator for the current Enumerable. |
protected boolean |
internalOnceOnly()
Gets whether the current instance may yield a
Enumerator
only once. |
enumerating, enumerator, onceOnlyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, as, asEnumeration, asFiltered, asSpliterator, asStream, asTolerant, asTolerant, cached, cached, choiceOf, choiceOf, concat, concatOn, distinct, elementsEqual, empty, filter, flatMap, iterate, iterator, limit, limitWhile, map, map, of, of, of, of, of, of, ofLateBinding, ofLazyEnumeration, ofLazyIterable, ofLazyIterator, ofLazySpliterator, ofLazyStream, on, onceOnly, peek, prepend, prependOn, range, rangeClosed, rangeInt, rangeIntClosed, rangeLong, rangeLongClosed, repeat, repeatAll, repeatEach, reverse, skip, skipWhile, sorted, sorted, take, takeWhile, union, unionOn, zipAll, zipAny, zipBoth, zipLeft, zipRightforEach, spliteratorpublic ChoiceEnumerable(Supplier<IntSupplier> indexSupplier, Supplier<IntUnaryOperator> nextIndexSupplier, Iterable<E> first, Iterable<? extends E> second, List<Iterable<E>> rest)
ChoiceEnumerable instance.indexSupplier - lazily provided IntSupplier instance that
yields the index of the source Iterable instance to get the next
element from.nextIndexSupplier - lazily provided IntSupplier instance
that yields the subsequent indexes of the source Iterable
instance to get the next element from, if the source indicated by
indexSupplier runs out of elements.first - first Iterable source to choose elements from.second - second Iterable source to choose elements from.rest - rest of Iterable sources to choose elements from.protected boolean internalOnceOnly()
AbstractEnumerableEnumerator
only once.
This method is the internal counterpart of AbstractEnumerable.onceOnly().
internalOnceOnly in class AbstractEnumerable<E>AbstractEnumerable.enumerator() may be called
only once, false otherwise.protected Enumerator<E> internalEnumerator()
AbstractEnumerableEnumerator for the current Enumerable.
This method is the internal counterpart of AbstractEnumerable.enumerator().
internalEnumerator in class AbstractEnumerable<E>Enumerator instance.EnumerableCopyright © 2016. All rights reserved.