Enum Class Sort.Direction

java.lang.Object
java.lang.Enum<Sort.Direction>
cloud.opencode.base.core.page.Sort.Direction
All Implemented Interfaces:
Serializable, Comparable<Sort.Direction>, Constable
Enclosing class:
Sort

public static enum Sort.Direction extends Enum<Sort.Direction>
Sort direction. 排序方向。
Since:
JDK 25, opencode-base-core V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • ASC

      public static final Sort.Direction ASC
      Ascending order | 升序
    • DESC

      public static final Sort.Direction DESC
      Descending order | 降序
  • Method Details

    • values

      public static Sort.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 Sort.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
    • reverse

      public Sort.Direction reverse()
      Returns the opposite direction. 返回相反方向。
      Returns:
      the opposite direction | 相反方向
    • isAscending

      public boolean isAscending()
      Returns true if this is ascending. 如果为升序则返回 true