oracle.kv.table

## Class KeyPair

- java.lang.Object
- - oracle.kv.table.KeyPair

- All Implemented Interfaces:
    Comparable<KeyPair>

      public class KeyPair
      extends Object
      implements Comparable<KeyPair>

  A wrapper class for return values from `TableAPI.tableKeysIterator(IndexKey, MultiRowOptions, oracle.kv.table.TableIteratorOptions)` This classes allows the iterator to return all field value information that can be obtained directly from the index without an additional fetch. Note: this class has a natural ordering that is inconsistent with equals. Ordering is based on the indexKey only.
  Since:
    3.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(KeyPair other)` Compares the IndexKey of this object with the IndexKey of the specified object for order.
    `IndexKey` | `getIndexKey()` Returns the IndexKey from the pair.
    `PrimaryKey` | `getPrimaryKey()` Returns the PrimaryKey from the pair.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getPrimaryKey

          public PrimaryKey getPrimaryKey()

      Returns the PrimaryKey from the pair.
      Returns:
        the PrimaryKey

    - #### getIndexKey

          public IndexKey getIndexKey()

      Returns the IndexKey from the pair.
      Returns:
        the IndexKey

    - #### compareTo

          public int compareTo(KeyPair other)

      Compares the IndexKey of this object with the IndexKey of the specified object for order. If the IndexKey values are the same a secondary comparison is done on the PrimaryKey values.
      Specified by:
        `compareTo` in interface `Comparable<KeyPair>`

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.