ElementType
- Type of element being enumeratedpublic class IteratorEnumeration<ElementType>
extends java.lang.Object
implements java.util.Enumeration<ElementType>
More information about this class is available from ostermiller.org.
Constructor and Description |
---|
IteratorEnumeration(java.util.Iterator<ElementType> iterator)
Create an Enumeration from an Iterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Tests if this enumeration contains more elements.
|
ElementType |
nextElement()
Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
|
public IteratorEnumeration(java.util.Iterator<ElementType> iterator)
iterator
- Iterator to convert to an enumeration.public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration<ElementType>
public ElementType nextElement() throws java.util.NoSuchElementException
nextElement
in interface java.util.Enumeration<ElementType>
java.util.NoSuchElementException
- if no more elements exist.Copyright (c) 2001-2020 by Stephen Ostermiller