Class EmptyEnumeration

java.lang.Object
de.intarsys.tools.collection.EmptyEnumeration
All Implemented Interfaces:
Enumeration

public class EmptyEnumeration extends Object implements Enumeration
An Enumeration without elements.
  • Field Details

  • Constructor Details

    • EmptyEnumeration

      protected EmptyEnumeration()
      Create an emtpy enumeration
  • Method Details

    • hasMoreElements

      public boolean hasMoreElements()
      Return always false as an emtpy enumeration has no elements.
      Specified by:
      hasMoreElements in interface Enumeration
      Returns:
      Return always false as an emtpy enumeration has no elements.
    • nextElement

      public Object nextElement()
      Throw always exception, as an empty enumeration has no elements.
      Specified by:
      nextElement in interface Enumeration
      Returns:
      never
      Throws:
      NoSuchElementException - Is thrown always