Interface IndexIterator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getKey()
      Returns the key Object currently referenced by this iterator.
      long getRecPtr()
      Returns the record Object currently referenced by this iterator.
      boolean isValid()
      Checks to see if this iterator is valid.
      boolean moveFirst()
      Moves this iterator to the first record in sequence.
      boolean moveLast()
      Moves this iterator to the last record in sequence.
      boolean moveNext()
      Moves this iterator to the next record in sequence.
      boolean movePrevious()
      Moves this iterator to the previous record in sequence.
      boolean moveTo​(KeyObject key)
      Moves this iterator to the record associated with the given key.
      boolean moveTo​(KeyObject key, boolean acceptNext)
      Moves this iterator to the record associated with the given key.
    • Method Detail

      • getRecPtr

        long getRecPtr()
                throws java.io.IOException
        Returns the record Object currently referenced by this iterator.
        Returns:
        a long pointer (usually a file position) associated with this index entry; returns -1 if the iterator is invalid or the record was not found
        Throws:
        java.io.IOException
      • getKey

        java.lang.Object getKey()
                         throws java.io.IOException
        Returns the key Object currently referenced by this iterator.
        Returns:
        the key Object currently referenced by this iterator; returns null if the iterator is invalid or the record was not found
        Throws:
        java.io.IOException
      • moveNext

        boolean moveNext()
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
        Moves this iterator to the next record in sequence.
        Returns:
        true if the operation was successful; false otherwise
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • movePrevious

        boolean movePrevious()
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException
        Moves this iterator to the previous record in sequence.
        Returns:
        true if the operation was successful; false otherwise.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • moveFirst

        boolean moveFirst()
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException
        Moves this iterator to the first record in sequence.
        Returns:
        true if the operation was successful; false otherwise.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • moveLast

        boolean moveLast()
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
        Moves this iterator to the last record in sequence.
        Returns:
        true if the operation was successful; false otherwise.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • moveTo

        boolean moveTo​(KeyObject key)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException
        Moves this iterator to the record associated with the given key.
        Parameters:
        key - key identifier to find
        Returns:
        true if the operation was successful; false otherwise.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • moveTo

        boolean moveTo​(KeyObject key,
                       boolean acceptNext)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException
        Moves this iterator to the record associated with the given key.
        Parameters:
        key - key identifier to find
        Returns:
        true if the operation was successful; false otherwise.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • isValid

        boolean isValid()
        Checks to see if this iterator is valid.
        Returns:
        true if the iterator is valid; false if it is invalid.