Enum Order
- java.lang.Object
- 
- java.lang.Enum<Order>
- 
- org.apache.tinkerpop.gremlin.process.traversal.Order
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Order>,- Comparator<Object>
 
 public enum Order extends Enum<Order> implements Comparator<Object> ProvidesComparatorinstances for ordering traversers.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intcompare(Object first, Object second)abstract Orderreversed()Produce the opposite representation of the currentOrderenum.static OrdervalueOf(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.- 
Methods inherited from class java.lang.Enumclone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 - 
Methods inherited from interface java.util.Comparatorequals, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
 
- 
 
- 
- 
- 
Enum Constant Detail- 
shufflepublic static final Order 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
 
 - 
ascpublic static final Order asc Order in ascending fashion.- Since:
- 3.3.4
 
 - 
descpublic static final Order desc Order in descending fashion.- Since:
- 3.3.4
 
 
- 
 - 
Method Detail- 
valuespublic static Order[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Order c : Order.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static Order valueOf(String name) 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 name
- NullPointerException- if the argument is null
 
 - 
comparepublic abstract int compare(Object first, Object second) - Specified by:
- comparein interface- Comparator<Object>
 
 - 
reversedpublic abstract Order reversed() Produce the opposite representation of the currentOrderenum.- Specified by:
- reversedin interface- Comparator<Object>
 
 
- 
 
-