F
- the type of elements in the underlying EnumerationT
- the type that the elements should be converted topublic static class ConverterCollections.ConverterEnumerator<F,T> extends Object implements Enumeration<T>, Iterator<T>
Modifier and Type | Field and Description |
---|---|
protected Converter<F,T> |
m_conv
Converter to convert each item.
|
protected Iterator<F> |
m_iter
Iterator of Objects to convert.
|
Constructor and Description |
---|
ConverterEnumerator(Enumeration<F> enmr,
Converter<F,T> conv)
Construct the Converter enumerator based on an Enumeration.
|
ConverterEnumerator(Iterator<F> iter,
Converter<F,T> conv)
Construct the Converter enumerator based on an Iterator.
|
ConverterEnumerator(Object[] aoItem,
Converter<F,T> conv)
Construct the Converter enumerator based on an array of objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Tests if this enumeration contains more elements.
|
boolean |
hasNext()
Determine if this Iterator contains more elements.
|
T |
next()
Returns the next element of this Iterator.
|
T |
nextElement()
Get the next element in the enumeration.
|
void |
remove()
Remove the last-returned element that was returned by the Iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ConverterEnumerator(Enumeration<F> enmr, Converter<F,T> conv)
enmr
- java.util.Enumeration of objects to convertconv
- a Converterpublic ConverterEnumerator(Iterator<F> iter, Converter<F,T> conv)
iter
- java.util.Iterator of objects to convertconv
- a Converterpublic boolean hasMoreElements()
hasMoreElements
in interface Enumeration<T>
public T nextElement()
nextElement
in interface Enumeration<T>
public boolean hasNext()
public T next()