public class LexicographicByteArrayComparator extends Object implements Comparator<byte[]>
| Modifier and Type | Field and Description |
|---|---|
static LexicographicByteArrayComparator |
COMPARATOR |
| Constructor and Description |
|---|
LexicographicByteArrayComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(byte[] a,
byte[] b) |
static int |
lexicographicalCompare(byte[] a,
byte[] b)
Compares two
byte arrays lexicographically. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final LexicographicByteArrayComparator COMPARATOR
public int compare(byte[] a,
byte[] b)
compare in interface Comparator<byte[]>public static int lexicographicalCompare(byte[] a,
byte[] b)
byte arrays lexicographically.a - the first array to compareb - the second array to compare0 if the first and second array are equal and
contain the same elements in the same order; a value less than
0 if the first array is lexicographically less than the
second array; and a value greater than 0 if the first
array is lexicographically greater than the second arrayCopyright © 2022. All rights reserved.