Class IteratorEnumeration
- java.lang.Object
-
- org.apache.commons.collections.iterators.IteratorEnumeration
-
- All Implemented Interfaces:
java.util.Enumeration
@Deprecated(since="2021-04-30") public class IteratorEnumeration extends java.lang.Object implements java.util.EnumerationDeprecated.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 anIteratorinstance appear to be anEnumerationinstance.- Since:
- Commons Collections 1.0
-
-
Constructor Summary
Constructors Constructor Description IteratorEnumeration()Deprecated.Constructs a newIteratorEnumerationthat will not function untilsetIteratoris invoked.IteratorEnumeration(java.util.Iterator iterator)Deprecated.Constructs a newIteratorEnumerationthat will use the given iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.IteratorgetIterator()Deprecated.Returns the underlying iterator.booleanhasMoreElements()Deprecated.Returns true if the underlying iterator has more elements.java.lang.ObjectnextElement()Deprecated.Returns the next element from the underlying iterator.voidsetIterator(java.util.Iterator iterator)Deprecated.Sets the underlying iterator.
-
-
-
Constructor Detail
-
IteratorEnumeration
public IteratorEnumeration()
Deprecated.Constructs a newIteratorEnumerationthat will not function untilsetIteratoris invoked.
-
IteratorEnumeration
public IteratorEnumeration(java.util.Iterator iterator)
Deprecated.Constructs a newIteratorEnumerationthat will use the given iterator.- Parameters:
iterator- the iterator to use
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
Deprecated.Returns true if the underlying iterator has more elements.- Specified by:
hasMoreElementsin interfacejava.util.Enumeration- Returns:
- true if the underlying iterator has more elements
-
nextElement
public java.lang.Object nextElement()
Deprecated.Returns the next element from the underlying iterator.- Specified by:
nextElementin interfacejava.util.Enumeration- Returns:
- the next element from the underlying iterator.
- Throws:
java.util.NoSuchElementException- if the underlying iterator has no more elements
-
getIterator
public java.util.Iterator getIterator()
Deprecated.Returns the underlying iterator.- Returns:
- the underlying iterator
-
setIterator
public void setIterator(java.util.Iterator iterator)
Deprecated.Sets the underlying iterator.- Parameters:
iterator- the new underlying iterator
-
-