public class IteratorEnumeration
extends java.lang.Object
implements java.util.Enumeration
IteratorEnumeration
provides a one-to-one mapping
from the pre Java 2 Enumeration
to the Java 2
Iterator
Constructor and Description |
---|
IteratorEnumeration(java.util.Iterator iter)
Create a new
IteratorEnumeration given an
Iterator that backs up the
Enumeration |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Tests if this enumeration contains more elements.
|
java.lang.Object |
nextElement()
Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
|
public IteratorEnumeration(java.util.Iterator iter)
IteratorEnumeration
given an
Iterator
that backs up the
Enumeration
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
true
if and only if this enumeration object
contains at least one more element to provide;
false
otherwise.public java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
NoSuchElementException
- if no more elements exist.Copyright © 2010 - 2020 Adobe. All Rights Reserved