Package com.tangosol.util
Class ConverterCollections.ConverterEnumerator<F,T>
java.lang.Object
com.tangosol.util.ConverterCollections.ConverterEnumerator<F,T>
- Type Parameters:
F- the type of elements in the underlying EnumerationT- the type that the elements should be converted to
- All Implemented Interfaces:
Enumeration<T>,Iterator<T>
- Direct Known Subclasses:
ConverterCollections.ConverterLongArray.ConverterLongArrayIterator,ConverterEnumerator
- Enclosing class:
- ConverterCollections
public static class ConverterCollections.ConverterEnumerator<F,T>
extends Object
implements Enumeration<T>, Iterator<T>
Provide an implementation of an enumerator which converts each of the
items which it enumerates.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConverterEnumerator(Object[] aoItem, Converter<F, T> conv) Construct the Converter enumerator based on an array of objects.ConverterEnumerator(Enumeration<F> enmr, Converter<F, T> conv) Construct the Converter enumerator based on an Enumeration.Construct the Converter enumerator based on an Iterator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this enumeration contains more elements.booleanhasNext()Determine if this Iterator contains more elements.next()Returns the next element of this Iterator.Get the next element in the enumeration.voidremove()Remove the last-returned element that was returned by the Iterator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
m_iter
Iterator of Objects to convert. -
m_conv
Converter to convert each item.
-
-
Constructor Details
-
ConverterEnumerator
Construct the Converter enumerator based on an Enumeration.- Parameters:
enmr- java.util.Enumeration of objects to convertconv- a Converter
-
ConverterEnumerator
Construct the Converter enumerator based on an Iterator.- Parameters:
iter- java.util.Iterator of objects to convertconv- a Converter
-
ConverterEnumerator
Construct the Converter enumerator based on an array of objects.- Parameters:
aoItem- array of objects to enumerateconv- a Converter
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Tests if this enumeration contains more elements.- Specified by:
hasMoreElementsin interfaceEnumeration<F>- Returns:
- false if the enumeration has been exhausted
-
nextElement
Get the next element in the enumeration.- Specified by:
nextElementin interfaceEnumeration<F>- Returns:
- the next element of this enumeration
-
hasNext
public boolean hasNext()Determine if this Iterator contains more elements. -
next
Returns the next element of this Iterator. -
remove
public void remove()Remove the last-returned element that was returned by the Iterator.
-