E - Type of enumerated elements.final class CacheEnumerator<E> extends AbstractEnumerator<E>
Enumerator over cached enumerated elements.
The enumerated elements get cached by CachedEnumerable into
a linked list of CachedElementWrapper instances. The
CacheEnumerator instances enumerated over these linked lists.
| Constructor and Description |
|---|
CacheEnumerator(Optional<CachedElementWrapper<E>> cached)
Constructs a
CacheEnumerator encapsulating an optional
CachedElementWrapper. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup()
Cleans up the internals of the current enumerator when enumeration
ends.
|
protected boolean |
internalHasNext()
Returns whether the enumerator has more elements.
|
protected E |
internalNext()
Returns the next enumerated element.
|
enumerating, hasNext, nextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallMatch, anyMatch, append, as, asEnumerable, asEnumeration, asFiltered, asOptional, asShareable, asSpliterator, asStream, asSupplier, asTolerant, asTolerant, choiceOf, choiceOf, collect, concat, concat, concat, concat, concat, concat, concatOn, contains, count, distinct, elementAt, elementsEqual, empty, filter, first, flatMap, forEach, iterate, last, limit, limitWhile, map, map, max, min, noneMatch, of, of, of, of, of, of, of, ofLateBinding, ofLazyEnumeration, ofLazyIterable, ofLazyIterator, ofLazySpliterator, ofLazyStream, on, peek, prepend, prepend, prepend, prepend, prepend, prepend, prependOn, range, rangeClosed, rangeInt, rangeIntClosed, rangeLong, rangeLongClosed, reduce, reduce, repeat, repeatAll, repeatAll, repeatEach, reverse, single, skip, skipWhile, sorted, sorted, take, takeWhile, toArray, toList, toMap, toSet, union, union, union, union, union, union, unionOn, zipAll, zipAny, zipBoth, zipLeft, zipRightforEachRemaining, removepublic CacheEnumerator(Optional<CachedElementWrapper<E>> cached)
CacheEnumerator encapsulating an optional
CachedElementWrapper.cached - Optional CachedElementWrapper representing
the head of the list to enumerate.CachedEnumerableprotected boolean internalHasNext()
AbstractEnumerator
This method is the internal counterpart of AbstractEnumerator.hasNext().
internalHasNext in class AbstractEnumerator<E>AbstractEnumerator.next()protected E internalNext()
AbstractEnumerator
This method is the internal counterpart of AbstractEnumerator.hasNext()
internalNext in class AbstractEnumerator<E>protected void cleanup()
AbstractEnumeratorBy default this method does nothing.
cleanup in class AbstractEnumerator<E>AbstractEnumerator.hasNext(),
AbstractEnumerator.next(),
AbstractEnumerator.internalHasNext(),
AbstractEnumerator.internalNext()Copyright © 2016. All rights reserved.