Class EnumerationIterator<E>

java.lang.Object
com.tangosol.util.Base
com.tangosol.util.EnumerationIterator<E>
All Implemented Interfaces:
Iterator<E>

public class EnumerationIterator<E> extends Base implements Iterator<E>
Provide a implementation of an Iterator based on data from an Enumeration.
Version:
1.00, 2002.02.07
Author:
Cameron Purdy
  • Constructor Details

    • EnumerationIterator

      public EnumerationIterator(Enumeration<E> enmr)
      Construct the Iterator based on an Enumeration.
      Parameters:
      enmr - an Enumeration
  • Method Details

    • hasNext

      public boolean hasNext()
      Tests if this Iterator contains more elements.
      Specified by:
      hasNext in interface Iterator<E>
      Returns:
      true if the Iterator contains more elements, false otherwise
    • next

      public E next()
      Returns the next element of this Iterator.
      Specified by:
      next in interface Iterator<E>
      Returns:
      the next element in the Iterator
    • remove

      public void remove()
      Remove the last-returned element that was returned by the Iterator. This method always throws UnsupportedOperationException because the Iterator is immutable.
      Specified by:
      remove in interface Iterator<E>