Package com.google.common.primitives
Enum Class UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator
java.lang.Object
java.lang.Enum<UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator>
com.google.common.primitives.UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator
- All Implemented Interfaces:
Serializable
,Comparable<UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator>
,Constable
,Comparator<byte[]>
- Enclosing class:
UnsignedBytes.LexicographicalComparatorHolder
static enum UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator
extends Enum<UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator>
implements Comparator<byte[]>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final boolean
(package private) static final int
The offset to the first element in a byte array.(package private) static final sun.misc.Unsafe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(byte[] left, byte[] right) private static sun.misc.Unsafe
Returns a sun.misc.Unsafe.toString()
Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
BIG_ENDIAN
static final boolean BIG_ENDIAN -
theUnsafe
static final sun.misc.Unsafe theUnsafe -
BYTE_ARRAY_BASE_OFFSET
static final int BYTE_ARRAY_BASE_OFFSETThe offset to the first element in a byte array.
-
-
Constructor Details
-
UnsafeComparator
private UnsafeComparator()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getUnsafe
private static sun.misc.Unsafe getUnsafe()Returns a sun.misc.Unsafe. Suitable for use in a 3rd party package. Replace with a simple call to Unsafe.getUnsafe when integrating into a jdk.- Returns:
- a sun.misc.Unsafe
-
compare
public int compare(byte[] left, byte[] right) - Specified by:
compare
in interfaceComparator<byte[]>
-
toString
- Overrides:
toString
in classEnum<UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator>
-