|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.util.EnumerationIterator<T>
public class EnumerationIterator<T>
Adapts an Enumeration to the Iterator and Iterable interfaces.
Copyright © 2003-2005 David A. Hall
Constructor Summary | |
---|---|
EnumerationIterator(java.util.Enumeration<T> enumeration)
Builds an EnumerationIterator that adapts the given enumeration to the Iterator and Iterable interfaces. |
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if the base enumeration has elements remaining. |
java.util.Iterator<T> |
iterator()
|
T |
next()
Returns the next element in the base enumeration. |
void |
remove()
throws UnsupportedOperationException: Enumerations do not support the removal of elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumerationIterator(java.util.Enumeration<T> enumeration)
java.lang.IllegalArgumentException
- if the given enumeration is null.Method Detail |
---|
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public T next()
next
in interface java.util.Iterator<T>
java.util.NoSuchElementException
- if the base enumeration is at its end.public void remove() throws java.lang.UnsupportedOperationException
remove
in interface java.util.Iterator<T>
java.lang.UnsupportedOperationException
- when called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |