Package tkrzw

Class IndexIterator

Object
IndexIterator

public class IndexIterator extends Object
Iterator for each record of the secondary index.
Note:
An iterator is made by the "makeIterator" method of Index. Every unused iterator object should be destructed explicitly by the "destruct" method to free resources.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destructs the object and releases resources.
    void
    Initializes the iterator to indicate the first record.
    byte[][]
    get()
    Gets the key and the value of the current record of the iterator.
    Gets the key and the value of the current record of the iterator.
    void
    jump(byte[] key, byte[] value)
    Initializes the iterator to indicate a specific range.
    void
    jump(String key, String value)
    Initializes the iterator to indicate a specific range, with string data.
    void
    Initializes the iterator to indicate the last record.
    void
    Moves the iterator to the next record.
    void
    Moves the iterator to the previous record.
    Gets a string representation of the iterator.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • destruct

      public void destruct()
      Destructs the object and releases resources.
    • first

      public void first()
      Initializes the iterator to indicate the first record.
    • last

      public void last()
      Initializes the iterator to indicate the last record.
    • jump

      public void jump(byte[] key, byte[] value)
      Initializes the iterator to indicate a specific range.
      Parameters:
      key - The key of the lower bound.
      value - The value of the lower bound.
    • jump

      public void jump(String key, String value)
      Initializes the iterator to indicate a specific range, with string data.
      Parameters:
      key - The key of the lower bound.
      value - The value of the lower bound.
    • next

      public void next()
      Moves the iterator to the next record.
    • previous

      public void previous()
      Moves the iterator to the previous record.
    • get

      public byte[][] get()
      Gets the key and the value of the current record of the iterator.
      Returns:
      A pair of the key and the value of the current record, or null on failure.
    • getString

      public String[] getString()
      Gets the key and the value of the current record of the iterator.
      Returns:
      A pair of the key and the value of the current record, or null on failure.
    • toString

      public String toString()
      Gets a string representation of the iterator.
      Overrides:
      toString in class Object