Class Enumerator

  • All Implemented Interfaces:
    java.util.Iterator

    public class Enumerator
    extends java.lang.Object
    implements java.util.Iterator
    This class wraps an enumeration around an iterator.
    Version:
    $Revision: 14756 $
    Author:
    Olivier Dedieu
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
    • Constructor Summary

      Constructors 
      Constructor Description
      Enumerator​(java.util.Enumeration enu)
      Creates an iterator wraps around the given enumeration
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Checks whether there are more elements to be processed.
      java.lang.Object next()
      Returns the next element in the iteration.
      void remove()
      Removes from the underlying collection the last element returned by the iterator.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Constructor Detail

      • Enumerator

        public Enumerator​(java.util.Enumeration enu)
        Creates an iterator wraps around the given enumeration
        Parameters:
        enu - enumeration on the data.
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Checks whether there are more elements to be processed.
        Specified by:
        hasNext in interface java.util.Iterator
        Returns:
        rue if the iteration is not completed.
        See Also:
        Enumeration.hasMoreElements()
      • next

        public final java.lang.Object next()
        Returns the next element in the iteration. It retrieves the next data and returns the owner of this data.
        Specified by:
        next in interface java.util.Iterator
        Returns:
        the next object.
        See Also:
        Enumeration.nextElement()
      • remove

        public final void remove()
                          throws java.lang.UnsupportedOperationException
        Removes from the underlying collection the last element returned by the iterator. This operation is not implemented.
        Specified by:
        remove in interface java.util.Iterator
        Throws:
        java.lang.UnsupportedOperationException