public class IteratorEnumerator extends Object implements Enumeration, Iterator
Modifier | Constructor and Description |
---|---|
protected |
IteratorEnumerator() |
|
IteratorEnumerator(Enumeration enumer)
Using this constructor will convert the Enumeration to an Iterator;
|
|
IteratorEnumerator(Iterator it)
Using this constructor will convert the Iterator to an Enumeration.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
This returns the hasNext() method.
|
boolean |
hasNext()
Override this to implement your own hasNext().
|
Object |
next()
Override this to implement your own next().
|
Object |
nextElement()
This returns the next() method.
|
void |
remove()
The default version of this will throw an UnsupportedOperationException.
|
protected IteratorEnumerator()
public IteratorEnumerator(Iterator it)
public IteratorEnumerator(Enumeration enumer)
public boolean hasNext()
public Object next()
public final boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public final Object nextElement() throws NoSuchElementException
nextElement
in interface Enumeration
NoSuchElementException