net.sf.jga.util
public class EnumerationIterator<T> extends Object implements Iterator<T>
Copyright © 2003 David A. Hall
Constructor Summary | |
---|---|
EnumerationIterator(Enumeration<T> enumeration)
Builds an EnumerationIterator that adapts the given enumeration to the
Iterator interface. |
Method Summary | |
---|---|
boolean | hasNext()
Returns true if the base enumeration has elements remaining. |
T | next()
Returns the next element in the base enumeration. |
void | remove()
throws UnsupportedOperationException: Enumerations do not support the
removal of elements. |
Throws: IllegalArgumentException if the given enumeration is null.
Returns: true if the base enumeration has elements remaining.
Returns: the next element in the base enumeration.
Throws: NoSuchElementException if the base enumeration is at its end.
Throws: UnsupportedOperationException when called.