E - Type of elements being enumerated.abstract class AbstractEnumerable<E> extends Object implements Enumerable<E>
Enumerable interface.
This class forms the basis for all the concrete implementations of
Enumerable within the enumj package.
AbstractEnumerator,
Enumerable,
Enumerator| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEnumerable()
Constructs a new
AbstractEnumerable instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enumerating()
Returns whether
enumerator() has been called at least once. |
Enumerator<E> |
enumerator()
Returns a new
Enumerator instance that enumerates over the
current Enumerable. |
protected abstract Enumerator<E> |
internalEnumerator()
Yields a new
Enumerator for the current Enumerable. |
protected abstract boolean |
internalOnceOnly()
Gets whether the current instance may yield a
Enumerator
only once. |
boolean |
onceOnly()
Returns whether the enumerable may generate only one iterator or not.
|
clone, 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, spliteratorprotected AbstractEnumerable()
AbstractEnumerable instance.
The new AbstractEnumerable instance gets initialised as
non-enumerating.
enumeratingpublic final boolean enumerating()
Enumerableenumerator() has been called at least once.
Most non-static methods of Enumerable require that this method
returns false.
enumerating in interface Enumerable<E>Enumerable.enumerating() has been called, false otherwise.public final boolean onceOnly()
EnumerableonceOnly in interface Enumerable<E>public final Enumerator<E> enumerator()
EnumerableEnumerator instance that enumerates over the
current Enumerable.
The default implementation of Enumerable.iterator() calls this method.
enumerator in interface Enumerable<E>Enumerator instance enumerating over the current
Enumerable instance.Enumerable.iterator()protected abstract boolean internalOnceOnly()
Enumerator
only once.
This method is the internal counterpart of onceOnly().
enumerator() may be called
only once, false otherwise.protected abstract Enumerator<E> internalEnumerator()
Enumerator for the current Enumerable.
This method is the internal counterpart of enumerator().
Enumerator instance.EnumerableCopyright © 2016. All rights reserved.