- All Implemented Interfaces:
Serializable,Comparable<TokenOrder>,java.lang.constant.Constable
An ordering of token values.
When ordering tokens, the null value is always considered the highest value.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe ordering from lowest to highest value.The ordering from highest to least value. -
Method Summary
Modifier and TypeMethodDescriptionintGets the multiplier associated with the ordering.Gets an abbreviated name for the ordering.static TokenOrderReturns the enum constant of this class with the specified name.static TokenOrder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASCENDING
The ordering from lowest to highest value. -
DESCENDING
The ordering from highest to least value.
-
-
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
-
getShortName
Gets an abbreviated name for the ordering.- Returns:
- the abbreviated name.
-
getMultiplier
public int getMultiplier()Gets the multiplier associated with the ordering. This is the value to apply to the results ofcompare()to get the appropriate sign reflecting the ordering.- Returns:
- the ordering's multiplier.
-