Class IntArrayRBT.IntArrayRBTKeyIterator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int currentNode  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getKey​(int node)  
      boolean hasNext()
      Check if there is a next element.
      boolean hasPrevious()
      Check if there is a previous element.
      void moveToEnd()
      Move the iterator to the end of the underlying index.
      void moveToStart()
      Move the iterator to the start of the underlying index.
      int nextNvc()
      version of next() which bypasses the validity check.
      int previous()
      Return the previous int and decrement the iterator.
      int previousNvc()
      version of previous that bypasses the validity check.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • currentNode

        protected int currentNode
    • Constructor Detail

      • IntArrayRBTKeyIterator

        protected IntArrayRBTKeyIterator()
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Description copied from interface: IntListIterator
        Check if there is a next element. Does not move the iterator.
        Specified by:
        hasNext in interface IntListIterator
        Returns:
        true iff there is a next element.
      • nextNvc

        public final int nextNvc()
        Description copied from interface: IntListIterator
        version of next() which bypasses the validity check. Only use this if you've already done this check yourself.
        Specified by:
        nextNvc in interface IntListIterator
        Returns:
        the next int in the list and increment the iterator.
      • previousNvc

        public int previousNvc()
        Description copied from interface: IntListIterator
        version of previous that bypasses the validity check. Only use this if you've already done this check yourself.
        Specified by:
        previousNvc in interface IntListIterator
        Returns:
        the previous int (found by first moving the iterator one backwards).
      • getKey

        protected final int getKey​(int node)