E - type of enumerated elements.public final class OnceEnumerable<E> extends EnumeratorEnumerable<E>
EnumeratorEnumerable that yields one enumerator only.Enumerator,
AbstractEnumerator| Constructor and Description |
|---|
OnceEnumerable(Iterator<E> source)
Creates an
OnceEnumerable 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. |
clearSource, getSourceenumerating, 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 OnceEnumerable(Iterator<E> source)
OnceEnumerable instance.
The new OnceEnumerable stores its source in its
ancestor EnumeratorEnumerable.
source - Iterator source.protected boolean internalOnceOnly()
AbstractEnumerableEnumerator
only once.
This method is the internal counterpart of AbstractEnumerable.onceOnly().
internalOnceOnly in class EnumeratorEnumerable<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 EnumeratorEnumerable<E>Enumerator instance.EnumerableCopyright © 2016. All rights reserved.