Class CollectionsPlume.EnumerationIterator<T>

java.lang.Object
org.plumelib.util.CollectionsPlume.EnumerationIterator<T>
Type Parameters:
T - the type of elements of the enumeration and iterator
All Implemented Interfaces:
Iterator<T>
Enclosing class:
CollectionsPlume

public static final class CollectionsPlume.EnumerationIterator<T> extends Object implements Iterator<T>
Converts an Enumeration into an Iterator.
  • Constructor Details

    • EnumerationIterator

      public EnumerationIterator(Enumeration<T> e)
      Create an Iterator that yields the elements of the given Enumeration.
      Parameters:
      e - the Enumeration to make into an Iterator
  • Method Details

    • hasNext

      public boolean hasNext(@GuardSatisfied CollectionsPlume.EnumerationIterator<T> this)
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next(@GuardSatisfied CollectionsPlume.EnumerationIterator<T> this)
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove(@GuardSatisfied CollectionsPlume.EnumerationIterator<T> this)
      Specified by:
      remove in interface Iterator<T>