Enum Class KiwiSort.Direction

java.lang.Object
java.lang.Enum<KiwiSort.Direction>
org.kiwiproject.spring.data.KiwiSort.Direction
All Implemented Interfaces:
Serializable, Comparable<KiwiSort.Direction>, Constable
Enclosing class:
KiwiSort

public static enum KiwiSort.Direction extends Enum<KiwiSort.Direction>
Sort direction.
  • Enum Constant Details

  • Field Details

    • ascending

      public final boolean ascending
      Accessible via a getter method as well as direct field access.
  • Method Details

    • values

      public static KiwiSort.Direction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KiwiSort.Direction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static KiwiSort.Direction fromString(String value)
      Converts the given value to a KiwiSort.Direction in a case-insensitive manner and ignoring leading and trailing whitespace.
      Parameters:
      value - the value to convert
      Returns:
      the KiwiSort.Direction representing the given value
      Throws:
      IllegalArgumentException - if there is no KiwiSort.Direction that matches ignoring case and stripping leading and trailing whitespace
    • isDescending

      public boolean isDescending()
      Convenience method to allow checking if this KiwiSort.Direction is descending.
      Returns:
      true if this sort is descending, false if ascending
    • isAscending

      public boolean isAscending()
      Accessible via a getter method as well as direct field access.