Enum Constant and Description |
---|
Ascending
First value comes before second value.
|
Descending
First value comes after second value.
|
Same
Values are the same.
|
Modifier and Type | Field and Description |
---|---|
boolean |
ascending
Is this order ascending?
|
boolean |
ascendingOrSame
Is this order ascending or the same?
|
int |
comparison
The equivalent of this order when used for standard compare.
|
boolean |
descending
Is this order descending?
|
boolean |
descendingOrSame
Is this order descending or the same?
|
boolean |
different
Is this order considering two values equal?
|
boolean |
same
Is this order considering two values equal?
|
static Indexable<Order> |
VALUES
The values of this enum.
|
Modifier and Type | Method and Description |
---|---|
static Order |
fromCompare(int value)
Get the order from a standard
Comparator or
Comparable result. |
static Order |
fromInternal(int internalValue)
Get the Order enum associated with the given internal value.
|
static Order |
fromInternal(int internalValue,
Order defaultValue)
Get the Order enum associated with the given internal value.
|
Order |
inverse()
Get the order which is the inverse of this one.
|
static Order |
valueOf(java.lang.String name)
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.
|
public static final Order Ascending
public static final Order Same
public static final Order Descending
public final int comparison
public final boolean ascending
v1, v2
this order
says that v1 < v2
.public final boolean ascendingOrSame
v1, v2
this order
says that v1 <= v2
.public final boolean descending
v1, v2
this order
says that v2 > v1
.public final boolean descendingOrSame
v1, v2
this order
says that v1 >= v2
.public final boolean same
v1, v2
this order
says that v1 == v2
.public final boolean different
v1, v2
this order
says that v1 != v2
.public static Order[] values()
for (Order c : Order.values()) System.out.println(c);
public static Order valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@NotNull public Order inverse()
@Nullable public static Order fromInternal(int internalValue)
internalValue
- internal valuenull
if there is none@NotNull public static Order fromInternal(int internalValue, @NotNull Order defaultValue)
internalValue
- internal valuedefaultValue
- default valuedefaultValue
if there is none