Class ClassIndexedSet.ClassIndexedSetIterator

All Implemented Interfaces:
Enclosing class:

protected class ClassIndexedSet.ClassIndexedSetIterator
extends Object
implements Iterator<T>
Iterator for set implementation ClassIndexedSet.
  • Field Details

    • set

      private final ClassIndexedSet<T> set
      The set instance over which this instance is an iterator.
    • iterator

      private final Iterator<T> iterator
      The iterator for the owner's underlying storage.
    • nextCalled

      private boolean nextCalled
      Flag which tracks whether next() has been called at least once.
    • removeStateValid

      private boolean removeStateValid
      Flag which tracks whether remove can currently be called.
    • current

      private T current
      The element most recently returned by next(), and the target for any subsequent remove() operation.
  • Constructor Details

    • ClassIndexedSetIterator

      protected ClassIndexedSetIterator​(ClassIndexedSet<T> parentSet, Iterator<T> parentIterator)
      parentSet - the ClassIndexedSet over which this instance is an iterator
      parentIterator - the iterator for the parent's underlying storage
  • Method Details

    • hasNext

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

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

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