java.lang.Object
net.i2p.util.ArraySet.ASIterator
All Implemented Interfaces:
Serializable, Iterator<E>
Enclosing class:
ArraySet<E>

private class ArraySet.ASIteratorextends Object implements Iterator<E>, Serializable
Modified from CachedIteratorArrayList Iterator implementation for ArraySet.
  • Field Details

    • cursor

      int cursor
      Index of element to be returned by subsequent call to next.
    • lastRet

      int lastRet
      Index of element returned by most recent call to next or previous. Reset to -1 if this element is deleted by a call to remove.
    • expectedModCount

      int expectedModCount
      The modCount value that the iterator believes that the backing List should have. If this expectation is violated, the iterator has detected concurrent modification.
  • Constructor Details

    • ASIterator

      private ASIterator()
      Walks the set's elements.
  • Method Details

    • hasNext

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

      public E next()
      Specified by:
      next in interface Iterator<E>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>
    • checkForComodification

      final void checkForComodification()
      Throws if the set changed since the iterator was made.