public class IlvEnumerationIterator<E> extends Object implements Iterator<E>
IlvEnumerationIterator
wrappers a enumeration into an iterator. This
allows to convert objects of type Enumeration
into objects of type
Iterator
.IlvIteratorEnumeration
Constructor and Description |
---|
IlvEnumerationIterator(Enumeration<? extends E> enumeration)
Creates an iterator from an enumeration.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns whether the iteration has more elements.
|
E |
next()
Returns the next element in the iteration.
|
void |
remove()
The method throws a
UnsupportedOperationException because removal is not
supported by IlvEnumerationIterator . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public IlvEnumerationIterator(Enumeration<? extends E> enumeration)
public boolean hasNext()
true
if next
would return an element rather than throwing
an exception.public E next()
next
in interface Iterator<E>
NoSuchElementException
- if the iteration has no more elements.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.