org.apache.directory.mavibot.btree.comparator

## Class ByteComparator

- java.lang.Object
- - org.apache.directory.mavibot.btree.comparator.ByteComparator

- All Implemented Interfaces:
    Comparator<Byte>

      public class ByteComparator
      extends Object
      implements Comparator<Byte>

  Compares bytes
  Author:
    Apache Directory Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ByteComparator` | `INSTANCE` A static instance of a ByteComparator

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Byte byte1, Byte byte2)` Compare two bytes.

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

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

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Field Detail

    - #### INSTANCE

          public static final ByteComparator INSTANCE

      A static instance of a ByteComparator

  - ### Method Detail

    - #### compare

          public int compare(Byte byte1,
                    Byte byte2)

      Compare two bytes.
      Specified by:
        `compare` in interface `Comparator<Byte>`
      Parameters:
        `byte1` - First byte
        `byte2` - Second byte
      Returns:
        1 if byte1 > byte2, 0 if byte1 == byte2, -1 if byte1 < byte2

Copyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.