Class CollectionTools.EnumerationIterator<T>

java.lang.Object
de.aristaflow.adept2.util.CollectionTools.EnumerationIterator<T>
Type Parameters:
T - The type of the iterated elements.
All Implemented Interfaces:
Iterator<T>
Enclosing class:
CollectionTools

public static class CollectionTools.EnumerationIterator<T> extends Object implements Iterator<T>
An iterator wrapping an Enumeration in an Iterator.
  • Field Details

    • enumeration

      protected final Enumeration<T> enumeration
      The wrapped enumeration.
  • Constructor Details

    • EnumerationIterator

      public EnumerationIterator(Enumeration<T> enumeration)
      Creates a new Iterator for the designated Enumeration.
      Parameters:
      enumeration - The Enumeration which to wrap in an Iterator.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>