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

public static enum OrderedIndex.OrderDirection extends Enum<OrderedIndex.OrderDirection>
enum for easing the order direction of the index
  • Enum Constant Details

  • Method Details

    • values

      public static OrderedIndex.OrderDirection[] 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

      public static OrderedIndex.OrderDirection 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
    • getDirection

      public String getDirection()
    • fromString

      @Nullable public static @Nullable OrderedIndex.OrderDirection fromString(@NotNull @NotNull String direction)
      retrieve an OrderDirection from 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

      public static OrderedIndex.OrderDirection fromIndexMeta(NodeState indexMeta)
      tells whether the provided index definition is ascending or descending
      Parameters:
      indexMeta -
      Returns:
      the direction
    • isDescending

      public static boolean isDescending(NodeState indexMeta)
      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

      public static boolean isAscending(NodeState indexMeta)
      convenience method that tells if the provided index definition is ascending
      Parameters:
      indexMeta -
      Returns:
      true if ascending