Packages This Package Prev Next Index
public interface java.util.Enumeration { // Methods public abstract boolean hasMoreElements(); §3.11.1 public abstract Object nextElement(); §3.11.2 }An object that implements the Enumeration interface generates a series of elements, one at a time. Successive calls to the nextElement method (I-§3.11.2) return successive elements of the series.
For example, to print all elements of a Vector v:
for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
System.out.println(e.nextElement());
}
public abstract boolean hasMoreElements()
public abstract Object nextElement()
Packages This Package Prev Next IndexJava API Document (HTML generated by dkramer on April 22, 1996)