org.eclipse.rdf4j.sail.nativerdf.btree

## Class DefaultRecordComparator

- java.lang.Object
- - org.eclipse.rdf4j.sail.nativerdf.btree.DefaultRecordComparator

- All Implemented Interfaces:
    RecordComparator

      public class DefaultRecordComparator
      extends Object
      implements RecordComparator

  A RecordComparator that compares values with eachother by comparing all of their bytes.
  Author:
    Arjohn Kampman

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultRecordComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareBTreeValues(byte[] key, byte[] data, int offset, int length)` Compares the supplied `key` to the value of length `length`, starting at offset `offset` in the supplied `data` array.

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

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

- - ### Constructor Detail

    - #### DefaultRecordComparator

          public DefaultRecordComparator()

  - ### Method Detail

    - #### compareBTreeValues

          public int compareBTreeValues(byte[] key,
                                        byte[] data,
                                        int offset,
                                        int length)

      Description copied from interface: `RecordComparator`
      Compares the supplied `key` to the value of length `length`, starting at offset `offset` in the supplied `data` array.
      Specified by:
        `compareBTreeValues` in interface `RecordComparator`
      Parameters:
        `key` - A byte array representing the search key.
        `data` - A byte array containing the value to compare the key to.
        `offset` - The offset (0-based) of the value in `data`.
        `length` - The length of the value.
      Returns:
        A negative integer when the key is smaller than the value, a positive integer when the key is larger than the value, or `0` when the key is equal to the value.

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.