Package org.apache.hadoop.hbase.util
Enum Order
- All Implemented Interfaces:
Serializable
,Comparable<Order>
Used to describe or modify the lexicographical sort order of a
byte[]
. Default ordering
is considered ASCENDING
. The order of a byte[]
can be inverted, resulting in
DESCENDING
order, by replacing each byte with its 1's compliment.-
Enum Constant Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract byte
apply
(byte val) Apply order to the byteval
.abstract void
apply
(byte[] val) Apply order to the byte arrayval
.abstract void
apply
(byte[] val, int offset, int length) Apply order to a range within the byte arrayval
.abstract int
cmp
(int cmp) Returns the adjusted trichotomous value according to the ordering imposed by thisOrder
.static Order
Returns the enum constant of this type with the specified name.static Order[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ASCENDING
-
DESCENDING
-
-
Constructor Details
-
Order
private Order()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
cmp
Returns the adjusted trichotomous value according to the ordering imposed by thisOrder
. -
apply
Apply order to the byteval
. -
apply
Apply order to the byte arrayval
. -
apply
Apply order to a range within the byte arrayval
.
-