| |
|
| java.lang.Object org.apache.commons.collections.iterators.IteratorEnumeration
IteratorEnumeration | public class IteratorEnumeration implements Enumeration(Code) | | Adapter to make an
Iterator Iterator instance appear to be
an
Enumeration Enumeration instance.
since: Commons Collections 1.0 version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $ author: James Strachan |
IteratorEnumeration | public IteratorEnumeration(Iterator iterator)(Code) | | Constructs a new IteratorEnumeration that will use
the given iterator.
Parameters: iterator - the iterator to use |
getIterator | public Iterator getIterator()(Code) | | Returns the underlying iterator.
the underlying iterator |
hasMoreElements | public boolean hasMoreElements()(Code) | | Returns true if the underlying iterator has more elements.
true if the underlying iterator has more elements |
nextElement | public Object nextElement()(Code) | | Returns the next element from the underlying iterator.
the next element from the underlying iterator. throws: java.util.NoSuchElementException - if the underlying iterator has nomore elements |
setIterator | public void setIterator(Iterator iterator)(Code) | | Sets the underlying iterator.
Parameters: iterator - the new underlying iterator |
|
|
|