Class EnumIterator

  • All Implemented Interfaces:
    Iterator, Iterator

    public class EnumIterator
    extends Object
    implements Iterator
    Implementation of an Iterator constructed by an Enumeration.
    Version:
    $Date$ $Revision$
    Author:
    Fabio Bellifemine, TILAB
    • Constructor Detail

      • EnumIterator

        public EnumIterator​(Enumeration enumeration)
        Constructor declaration
    • Method Detail

      • hasNext

        public boolean hasNext()
        Checks whether the iterator can scan further by looking at the underlying Enumeration.
        Specified by:
        hasNext in interface Iterator
        Returns:
        The return value of the hasMoreElements() method of the underlying Enumeration..
      • next

        public Object next()
        Retrieves the next element in the collection scanned by this iterator, forwarding the request to the underlying Enumeration.
        Specified by:
        next in interface Iterator
        Returns:
        The return value of the nextElement() of the underlying Enumeration.
      • remove

        public void remove()
        Remove the element pointed to by this iterator. This operation is not supported and this method will always throw a runtime exception
        Specified by:
        remove in interface Iterator