public interface Enumeration4D<E>
As of Java 1.2, the Iterator interface provides the same functionality, but with shorter method names and a new optional method to remove items from the list. If writing for 1.2, consider using Iterator instead. Enumerations over the new collections classes, for use with legacy APIs that require them, can be obtained by the enumeration method in class Collections.
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Tests whether there are elements remaining in the enumeration.
|
E |
nextElement()
Obtain the next element in the enumeration.
|
boolean hasMoreElements()
E nextElement()
java.util.NoSuchElementException
- if there are no more elements