Enum Class Order
- All Implemented Interfaces:
Serializable,Comparable<Order>,Constable,Comparator<Object>
Provides
Comparator instances for ordering traversers.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract intabstract Orderreversed()Produce the opposite representation of the currentOrderenum.static OrderReturns the enum constant of this class with the specified name.static Order[]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, toString, valueOfMethods inherited from interface java.util.Comparator
equals, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Enum Constant Details
-
shuffle
Order in a random fashion. While this enum implementsComparator, thecompare(a,b)method is not supported as a direct call. This change to the implementation ofcompare(a,b)occurred at 3.5.0 but this implementation was never used directly within the TinkerPop code base.- Since:
- 3.0.0-incubating
-
asc
Order in ascending fashion.- Since:
- 3.3.4
-
desc
Order in descending fashion.- Since:
- 3.3.4
-
-
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
-
compare
- Specified by:
comparein interfaceComparator<Object>
-
reversed
Produce the opposite representation of the currentOrderenum.- Specified by:
reversedin interfaceComparator<Object>
-