public class IteratorForEnumeration<T> extends Object implements Iterator<T>, Iterable<T>
for(String s : new IteratorForEnumeration<String>(someUntypedEnumeration)) {
System.out.println(s);
}
| Modifier and Type | Field and Description |
|---|---|
Enumeration<T> |
enumerator
Holds the enumeration object
|
| Constructor and Description |
|---|
IteratorForEnumeration(Enumeration enumerator) |
| Modifier and Type | Method and Description |
|---|---|
List<T> |
asList()
Returns the rest of the enumeration as a list
|
boolean |
hasNext() |
Iterator<T> |
iterator() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorpublic Enumeration<T> enumerator
public IteratorForEnumeration(Enumeration enumerator)
Copyright © 2018. All rights reserved.