public enum Order extends Enum<Order> implements Comparator<Object>
Comparator
instances for ordering traversers.Enum Constant and Description |
---|
asc
Order in ascending fashion.
|
desc
Order in descending fashion.
|
shuffle
Order in a random fashion.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(Object first,
Object second) |
abstract Order |
reversed()
Produce the opposite representation of the current
Order enum. |
static Order |
valueOf(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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final Order shuffle
Comparator
, the compare(a,b)
method is not
supported as a direct call. This change to the implementation of compare(a,b)
occurred at 3.5.0 but
this implementation was never used directly within the TinkerPop code base.public static final Order asc
public static final Order desc
public static Order[] values()
for (Order c : Order.values()) System.out.println(c);
public static Order 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 nullpublic abstract int compare(Object first, Object second)
compare
in interface Comparator<Object>
public abstract Order reversed()
Order
enum.reversed
in interface Comparator<Object>
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.