Interface EnumerationIterator<E>

All Superinterfaces:
Enumeration<E>, Iterator<E>
All Known Implementing Classes:
ArrayIterator

public interface EnumerationIterator<E> extends Enumeration<E>, Iterator<E>
An enumeration which is also an iterator.
Author:
David M. Lloyd
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Determine if there are more elements to iterate over in the direction of this iterator.
    default E
    Get the next element in the direction of this iterator.
    static <E> EnumerationIterator<E>
    over(E item)
    Get an enumeration iterator over one element.

    Methods inherited from interface java.util.Enumeration

    asIterator

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Method Details

    • hasMoreElements

      default boolean hasMoreElements()
      Determine if there are more elements to iterate over in the direction of this iterator.
      Specified by:
      hasMoreElements in interface Enumeration<E>
      Returns:
      true if there are more elements, false otherwise
    • nextElement

      default E nextElement()
      Get the next element in the direction of this iterator.
      Specified by:
      nextElement in interface Enumeration<E>
      Returns:
      the next element
    • over

      static <E> EnumerationIterator<E> over(E item)
      Get an enumeration iterator over one element.
      Type Parameters:
      E - the element type
      Parameters:
      item - the element
      Returns:
      the enumeration iterator