static enum Bytes.LexicographicalComparerHolder.UnsafeComparer extends Enum<Bytes.LexicographicalComparerHolder.UnsafeComparer> implements Bytes.Comparer<byte[]>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
(package private) static int |
BYTE_ARRAY_BASE_OFFSET
The offset to the first element in a byte array.
|
(package private) static boolean |
littleEndian |
(package private) static sun.misc.Unsafe |
theUnsafe |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(byte[] buffer1,
int offset1,
int length1,
byte[] buffer2,
int offset2,
int length2)
Lexicographically compare two arrays.
|
static boolean |
isAvailable()
Checks if Unsafe is available
|
(package private) static boolean |
lessThanUnsignedInt(int x1,
int x2)
Returns true if x1 is less than x2, when both values are treated as
unsigned int.
|
(package private) static boolean |
lessThanUnsignedLong(long x1,
long x2)
Returns true if x1 is less than x2, when both values are treated as
unsigned long.
|
(package private) static boolean |
lessThanUnsignedShort(short x1,
short x2)
Returns true if x1 is less than x2, when both values are treated as
unsigned short.
|
static Bytes.LexicographicalComparerHolder.UnsafeComparer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Bytes.LexicographicalComparerHolder.UnsafeComparer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Bytes.LexicographicalComparerHolder.UnsafeComparer INSTANCE
static final sun.misc.Unsafe theUnsafe
static final int BYTE_ARRAY_BASE_OFFSET
static final boolean littleEndian
public static Bytes.LexicographicalComparerHolder.UnsafeComparer[] values()
for (Bytes.LexicographicalComparerHolder.UnsafeComparer c : Bytes.LexicographicalComparerHolder.UnsafeComparer.values()) System.out.println(c);
public static Bytes.LexicographicalComparerHolder.UnsafeComparer valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullstatic boolean lessThanUnsignedLong(long x1, long x2)
static boolean lessThanUnsignedInt(int x1, int x2)
static boolean lessThanUnsignedShort(short x1, short x2)
public static boolean isAvailable()
public int compareTo(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
compareTo
in interface Bytes.Comparer<byte[]>
buffer1
- left operandbuffer2
- right operandoffset1
- Where to start comparing in the left bufferoffset2
- Where to start comparing in the right bufferlength1
- How much to compare from the left bufferlength2
- How much to compare from the right bufferCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.