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