Class IdentityArraySet.ArraySetIterator

java.lang.Object
org.plumelib.util.IdentityArraySet.ArraySetIterator
All Implemented Interfaces:
Iterator<E>
Enclosing class:
IdentityArraySet<E extends @UnknownSignedness Object>

private class IdentityArraySet.ArraySetIterator extends Object implements Iterator<E>
An iterator over the IdentityArraySet.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @org.checkerframework.checker.index.qual.NonNegative int
    The first unread index; the index of the next value to return.
    (package private) int
    The modification count when the iterator is created, for fail-fast.
    (package private) boolean
    True if remove() has been called since the last call to next().
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ArraySetIterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Returns true if this has another element.
    final E
     
    final void
    Removes the previously-returned element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Field Details

    • index

      @org.checkerframework.checker.index.qual.NonNegative int index
      The first unread index; the index of the next value to return.
    • removed

      boolean removed
      True if remove() has been called since the last call to next().
    • initialSizeModificationCount

      int initialSizeModificationCount
      The modification count when the iterator is created, for fail-fast.
  • Constructor Details

    • ArraySetIterator

      @SideEffectFree ArraySetIterator()
      Creates a new ArraySetIterator.
  • Method Details

    • hasNext

      @Pure public final boolean hasNext()
      Returns true if this has another element.
      Specified by:
      hasNext in interface Iterator<E extends @UnknownSignedness Object>
      Returns:
      true if this has another element
    • next

      public final E next()
      Specified by:
      next in interface Iterator<E extends @UnknownSignedness Object>
    • remove

      public final void remove()
      Removes the previously-returned element.
      Specified by:
      remove in interface Iterator<E extends @UnknownSignedness Object>