Enum SortResponseProcessor.SortOrder
java.lang.Object
java.lang.Enum<SortResponseProcessor.SortOrder>
org.opensearch.search.pipeline.common.SortResponseProcessor.SortOrder
- All Implemented Interfaces:
Serializable,Comparable<SortResponseProcessor.SortOrder>
- Enclosing class:
SortResponseProcessor
Enum defining how elements will be sorted
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSort in ascending (natural) orderSort in descending (reverse) order -
Method Summary
Modifier and TypeMethodDescriptionfromString(String value) Converts the string representation of the enum value to the enum.toString()Returns the enum constant of this type with the specified name.static SortResponseProcessor.SortOrder[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ASCENDING
Sort in ascending (natural) order -
DESCENDING
Sort in descending (reverse) order
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
toString
- Overrides:
toStringin classEnum<SortResponseProcessor.SortOrder>
-
fromString
Converts the string representation of the enum value to the enum.- Parameters:
value- A string ("asc" or "desc")- Returns:
- the corresponding enum value
-