com.thinkaurelius.titan.core

## Enum Order

- java.lang.Object
- - java.lang.Enum<Order>
  - - com.thinkaurelius.titan.core.Order

- All Implemented Interfaces:
    Serializable, Comparable<Order>

      public enum Order
      extends Enum<Order>

  Constants to specify the ordering of a result set in queries.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ASC` Increasing
    `DESC` Decreasing

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Order` | `DEFAULT` The default order when none is specified

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `modulateNaturalOrder(int compare)` Modulates the result of a `Comparable.compareTo(Object)` execution for this specific order, i.e.
    `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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ASC

          public static final Order ASC

      Increasing

    - #### DESC

          public static final Order DESC

      Decreasing

  - ### Field Detail

    - #### DEFAULT

          public static final Order DEFAULT

      The default order when none is specified

  - ### Method Detail

    - #### values

          public 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

    - #### valueOf

          public 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

    - #### modulateNaturalOrder

          public int modulateNaturalOrder(int compare)

      Modulates the result of a `Comparable.compareTo(Object)` execution for this specific order, i.e. it negates the result if the order is `DESC`.
      Parameters:
        `compare` -
      Returns:

Copyright © 2012–2014. All rights reserved.