Package org.midheaven.collections
Class AbstractEnumerableDecorator<T>
java.lang.Object
org.midheaven.collections.AbstractEnumerableDecorator<T>
- Type Parameters:
T- type of element in the Enumerable
- All Implemented Interfaces:
Iterable<T>,Enumerable<T>
- Direct Known Subclasses:
ArithmeticalEnumerable
Base implementation for a decorator of Enumerable.
See
ArithmeticalEnumerable for an example-
Constructor Summary
ConstructorsConstructorDescriptionAbstractEnumerableDecorator(Enumerable<T> original) Creates a new AbstractEnumerableDecorator. -
Method Summary
Modifier and TypeMethodDescriptionfinal Enumerator<T> Returns an enumerator over the elements.iterator()Returns an iterator over the elements.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.midheaven.collections.Enumerable
allMatch, any, anyMatch, as, associate, associate, cast, collect, concat, count, distinct, filter, first, flatMap, groupBy, isEmpty, limit, map, maximum, minimum, ofType, peek, reduce, reduce, skip, sorted, toArray, toArray, toArray, toDistinctAssortment, toSequence, toSequence, with, zipMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AbstractEnumerableDecorator
Creates a new AbstractEnumerableDecorator.- Parameters:
original- the original value
-
-
Method Details
-
enumerator
Returns an enumerator over the elements.- Specified by:
enumeratorin interfaceEnumerable<T>- Returns:
- the resulting enumerator
-
iterator
Returns an iterator over the elements.
-