Enumeration around a Java2 collection classes object
Iterator so that existing APIs returning Enumerations can easily run on top of the new collections.
Constructors are provided to easily create such wrappers.
| Modifier and Type | Field and Description |
|---|---|
| private Iterator | iterator
The |
| Access | Constructor and Description |
|---|---|
| public | Enumerator(Collection<E>
Collection whose values should be enumerated collection)Return an Enumeration over the values of the specified Collection. |
| public | Enumerator(Collection<E>
Collection whose values should be enumerated collection, boolean true to clone iterator clone)Return an Enumeration over the values of the specified Collection. |
| public | Enumerator(Iterable<E>
Iterable to be wrappedReturn an Enumeration over the values returned by the specified |
| public | Enumerator(Iterable<E>
Iterable to be wrappedtrue to clone iterator clone)Return an Enumeration over the values returned by the specified |
| public | Enumerator(Iterator<E>
Iterator to be wrapped iterator)Return an Enumeration over the values returned by the specified Iterator. |
| public | Enumerator(Iterator<E>
Iterator to be wrapped iterator, boolean true to clone iterator clone)Return an Enumeration over the values returned by the specified Iterator. |
| public | Enumerator(Map<?, E>
Map whose values should be enumerated map)Return an Enumeration over the values of the specified Map. |
| public | Enumerator(Map<?, E>
Map whose values should be enumerated map, boolean true to clone iterator clone)Return an Enumeration over the values of the specified Map. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if and only if this enumeration object contains at least one more element to provide, false otherwiseImplements java. Tests if this enumeration contains more elements. |
| public E | Returns: the next element of this enumerationImplements java. Returns the next element of this enumeration if this enumeration has at least one more element to provide. |
| iterator | back to summary |
|---|---|
| private Iterator<E> iterator The | |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Collection<E> collection) Return an Enumeration over the values of the specified Collection.
| |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Collection<E> collection, boolean clone) Return an Enumeration over the values of the specified Collection.
| |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Iterable<E> iterable) Return an Enumeration over the values returned by the specified | |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Iterable<E> iterable, boolean clone) Return an Enumeration over the values returned by the specified | |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Iterator<E> iterator) Return an Enumeration over the values returned by the specified Iterator.
| |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Iterator<E> iterator, boolean clone) Return an Enumeration over the values returned by the specified Iterator.
| |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Map<?, E> map) Return an Enumeration over the values of the specified Map.
| |
| Enumerator | back to summary |
|---|---|
| public Enumerator(Map<?, E> map, boolean clone) Return an Enumeration over the values of the specified Map.
| |
| hasMoreElements | back to summary |
|---|---|
| public boolean hasMoreElements() Implements java. Tests if this enumeration contains more elements.
| |
| nextElement | back to summary |
|---|---|
| public E nextElement() throws NoSuchElementException Implements java. Returns the next element of this enumeration if this enumeration has at least one more element to provide.
| |