Class SingleObjectEnumeration<T>

  • All Implemented Interfaces:
    java.util.Enumeration<T>

    public class SingleObjectEnumeration<T>
    extends java.lang.Object
    implements java.util.Enumeration<T>
    An enumeration of a single object.
    • Constructor Summary

      Constructors 
      Constructor Description
      SingleObjectEnumeration​(T single)
      EnumerationIterator constructor comment.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasMoreElements()  
      T nextElement()  
      void remove()
      Removes from the underlying collection the last element returned by the iterator (optional operation).
      • 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
    • Constructor Detail

      • SingleObjectEnumeration

        public SingleObjectEnumeration​(T single)
        EnumerationIterator constructor comment.
        Parameters:
        single -
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Specified by:
        hasMoreElements in interface java.util.Enumeration<T>
      • nextElement

        public T nextElement()
        Specified by:
        nextElement in interface java.util.Enumeration<T>
      • remove

        public void remove()
        Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
        Throws:
        java.lang.UnsupportedOperationException - if the remove operation is not supported by this Iterator.