org.apache.nutch.util

## Class Bytes.ByteArrayComparator

- java.lang.Object
- - org.apache.nutch.util.Bytes.ByteArrayComparator

- All Implemented Interfaces:
    java.util.Comparator<byte[]>, RawComparator<byte[]>
  Enclosing class:
    Bytes

      public static class Bytes.ByteArrayComparator
      extends java.lang.Object
      implements RawComparator<byte[]>

  Byte array comparator class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteArrayComparator()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(byte[] left, byte[] right)`
    `int` | `compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)`

    - ### 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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### ByteArrayComparator

          public ByteArrayComparator()

      Constructor

  - ### Method Detail

    - #### compare

          public int compare(byte[] left,
                             byte[] right)

      Specified by:
        `compare` in interface `java.util.Comparator<byte[]>`

    - #### compare

          public int compare(byte[] b1,
                             int s1,
                             int l1,
                             byte[] b2,
                             int s2,
                             int l2)

      Specified by:
        `compare` in interface `RawComparator<byte[]>`

Copyright © 2019 The Apache Software Foundation