Class EnumerationDecorator<E>
java.lang.Object
com.globalmentor.collections.iterators.AbstractEnumerationDecorator<E>
com.globalmentor.collections.iterators.EnumerationDecorator<E>
- Type Parameters:
E
- the type of elements returned by this enumeration.
- All Implemented Interfaces:
Enumeration<E>
,Iterator<E>
An enumeration that wraps an existing enumeration.
- Author:
- Garret Wilson
- API Note:
- This enumeration also serves as an adapter, converting an enumeration to an
Iterator
. - Implementation Specification:
- This implementation does not support element removal.
- Implementation Note:
- Subclasses may override
AbstractEnumerationDecorator.hasMoreElements()
and/orAbstractEnumerationDecorator.nextElement()
, andIterator
compatibility will be maintained.
-
Constructor Summary
-
Method Summary
Methods inherited from class com.globalmentor.collections.iterators.AbstractEnumerationDecorator
hasMoreElements, hasNext, next, nextElement, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
EnumerationDecorator
Enumeration constructor.- Parameters:
enumeration
- The enumeration this enumeration will decorate.- Throws:
NullPointerException
- if the given enumeration isnull
.
-
-
Method Details
-
getEnumeration
- Specified by:
getEnumeration
in classAbstractEnumerationDecorator<E>
- Returns:
- The enumeration this class decorates.
-