Class IteratorEnumeration
java.lang.Object
org.apache.commons.collections.iterators.IteratorEnumeration
- All Implemented Interfaces:
Enumeration
@Deprecated(since="2021-04-30")
public class IteratorEnumeration
extends Object
implements Enumeration
Deprecated.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
Adapter to make an
Iterator
instance appear to be
an Enumeration
instance.- Since:
- Commons Collections 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs a newIteratorEnumeration
that will not function untilsetIterator
is invoked.IteratorEnumeration
(Iterator iterator) Deprecated.Constructs a newIteratorEnumeration
that will use the given iterator. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the underlying iterator.boolean
Deprecated.Returns true if the underlying iterator has more elements.Deprecated.Returns the next element from the underlying iterator.void
setIterator
(Iterator iterator) Deprecated.Sets the underlying iterator.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
IteratorEnumeration
public IteratorEnumeration()Deprecated.Constructs a newIteratorEnumeration
that will not function untilsetIterator
is invoked. -
IteratorEnumeration
Deprecated.Constructs a newIteratorEnumeration
that will use the given iterator.- Parameters:
iterator
- the iterator to use
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Deprecated.Returns true if the underlying iterator has more elements.- Specified by:
hasMoreElements
in interfaceEnumeration
- Returns:
- true if the underlying iterator has more elements
-
nextElement
Deprecated.Returns the next element from the underlying iterator.- Specified by:
nextElement
in interfaceEnumeration
- Returns:
- the next element from the underlying iterator.
- Throws:
NoSuchElementException
- if the underlying iterator has no more elements
-
getIterator
Deprecated.Returns the underlying iterator.- Returns:
- the underlying iterator
-
setIterator
Deprecated.Sets the underlying iterator.- Parameters:
iterator
- the new underlying iterator
-