Record Class Sort.Order
java.lang.Object
java.lang.Record
cloud.opencode.base.web.page.Sort.Order
- Record Components:
property- the property to sort by | 排序属性direction- the sort direction | 排序方向
- Enclosing class:
Sort
Sort Order
排序顺序
- Since:
- JDK 25, opencode-base-web V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionOrder(String property, Sort.Direction direction) Compact constructor with validation 带验证的紧凑构造函数 -
Method Summary
Modifier and TypeMethodDescriptionstatic Sort.OrderCreate ascending order 创建升序static Sort.OrderCreate descending order 创建降序Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanCheck if ascending 检查是否升序booleanCheck if descending 检查是否降序property()Returns the value of thepropertyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Order
Compact constructor with validation 带验证的紧凑构造函数
-
-
Method Details
-
asc
Create ascending order 创建升序- Parameters:
property- the property | 属性- Returns:
- the order | 排序
-
desc
Create descending order 创建降序- Parameters:
property- the property | 属性- Returns:
- the order | 排序
-
isAscending
public boolean isAscending()Check if ascending 检查是否升序- Returns:
- true if ascending | 如果升序返回true
-
isDescending
public boolean isDescending()Check if descending 检查是否降序- Returns:
- true if descending | 如果降序返回true
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
property
-
direction
-