Enum OrderedIndex.OrderDirection

    • Method Detail

      • values

        public static OrderedIndex.OrderDirection[] 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 (OrderedIndex.OrderDirection c : OrderedIndex.OrderDirection.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OrderedIndex.OrderDirection valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getDirection

        public java.lang.String getDirection()
      • fromString

        @Nullable
        public static @Nullable OrderedIndex.OrderDirection fromString​(@NotNull
                                                                       @NotNull java.lang.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