Class EmptyEnumeration

  • All Implemented Interfaces:
    java.util.Enumeration

    public class EmptyEnumeration
    extends java.lang.Object
    implements java.util.Enumeration
    An Enumeration without elements.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Enumeration UNIQUE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected EmptyEnumeration()
      Create an emtpy enumeration
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasMoreElements()
      Return always false as an emtpy enumeration has no elements.
      java.lang.Object nextElement()
      Throw always exception, as an empty enumeration has no elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Enumeration

        asIterator
    • Field Detail

      • UNIQUE

        public static final java.util.Enumeration UNIQUE
    • Constructor Detail

      • EmptyEnumeration

        protected EmptyEnumeration()
        Create an emtpy enumeration
    • Method Detail

      • hasMoreElements

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

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