Intel

Developer Zone

Enumeration

java.util

Interface Enumeration<E>



  • public interface Enumeration<E>
    An Enumeration is used to sequence over a collection of objects.

    Preferably an Iterator should be used. Iterator replaces the enumeration interface and adds a way to remove elements from a collection.

    Version:
    1.0
    See Also:
    Hashtable, Properties, Vector
    • Method Summary

      Methods
      Modifier and Type Method and Description
      boolean hasMoreElements()
      Returns whether this Enumeration has more elements.
      E nextElement()
      Returns the next element in this Enumeration.
    • Method Detail

      • hasMoreElements

        boolean hasMoreElements()
        Returns whether this Enumeration has more elements.
        Returns:
        true if there are more elements, false otherwise.
        See Also:
        nextElement()