Enum Sort.Order
- java.lang.Object
-
- java.lang.Enum<Sort.Order>
-
- co.elasticsearch.enterprisesearch.client.model.Sort.Order
-
- All Implemented Interfaces:
SortOrder,Serializable,Comparable<Sort.Order>
- Enclosing class:
- Sort
public static enum Sort.Order extends Enum<Sort.Order> implements SortOrder
Represents a sort order
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASCENDINGAscending orderDESCENDINGDescending order
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Sort.OrderfromValue(String value)finds the order with the given valueSort.OrdergetOrder()The order of the sortStringgetValue()The string representation of the orderstatic Sort.OrdervalueOf(String name)Returns the enum constant of this type with the specified name.static Sort.Order[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ASCENDING
public static final Sort.Order ASCENDING
Ascending order
-
DESCENDING
public static final Sort.Order DESCENDING
Descending order
-
-
Method Detail
-
values
public static Sort.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 (Sort.Order c : Sort.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 Sort.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 nameNullPointerException- if the argument is null
-
fromValue
public static Sort.Order fromValue(String value)
finds the order with the given value- Parameters:
value- The value to find- Returns:
- The sort Order with the matching value, or an exception is thrown
-
getOrder
public Sort.Order getOrder()
The order of the sort
-
getValue
public String getValue()
The string representation of the order- Returns:
- the sort direction value
-
-