Enum OrderedIndex.OrderDirection
java.lang.Object
java.lang.Enum<OrderedIndex.OrderDirection>
org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection
- All Implemented Interfaces:
Serializable,Comparable<OrderedIndex.OrderDirection>,java.lang.constant.Constable
- Enclosing interface:
OrderedIndex
enum for easing the order direction of the index
-
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 TypeMethodDescriptionstatic OrderedIndex.OrderDirectionfromIndexMeta(NodeState indexMeta) tells whether the provided index definition is ascending or descendingstatic @Nullable OrderedIndex.OrderDirectionfromString(@NotNull String direction) retrieve anOrderDirectionfrom a provided String.booleanstatic booleanisAscending(NodeState indexMeta) convenience method that tells if the provided index definition is ascendingbooleanstatic booleanisDescending(NodeState indexMeta) convenience method that tells if the provided index definition is descendingstatic OrderedIndex.OrderDirectionReturns the enum constant of this type with the specified name.static OrderedIndex.OrderDirection[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ASC
ascending order configuration (default) -
DESC
descending order configuration
-
-
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
-
getDirection
-
fromString
@Nullable public static @Nullable OrderedIndex.OrderDirection fromString(@NotNull @NotNull String direction) retrieve anOrderDirectionfrom a provided String. Will return null in case of no-match- Parameters:
direction- the direction of the sorting: ascending or descending- Returns:
- the direction
-
fromIndexMeta
tells whether the provided index definition is ascending or descending- Parameters:
indexMeta-- Returns:
- the direction
-
isDescending
convenience method that tells if the provided index definition is descending- Parameters:
indexMeta-- Returns:
- true if descending
-
isAscending
public boolean isAscending() -
isDescending
public boolean isDescending() -
isAscending
convenience method that tells if the provided index definition is ascending- Parameters:
indexMeta-- Returns:
- true if ascending
-