public class Sort extends Object implements Iterable<Order>, Serializable
DEFAULT_DIRECTION.| Modifier and Type | Class and Description |
|---|---|
static class |
Sort.ModelValueDeserializer
Sort fastjson: 反序列化解析器 |
static class |
Sort.ModelValueJacksonDeserializer
Sort Jackson: 反序列化解析器 |
static class |
Sort.ModelValueJacksonSerializer
Sort Jackson: 序列化解析器 |
static class |
Sort.ModelValueJsonAdapter
Sort Gson: 序列化、反序列化解析器 |
| Modifier and Type | Field and Description |
|---|---|
static Direction |
DEFAULT_DIRECTION
Default direction
|
| Constructor and Description |
|---|
Sort(Direction direction,
List<String> properties)
Creates a new
Sort instance. |
Sort(Direction direction,
String... properties)
Creates a new
Sort instance. |
Sort(List<Order> orders)
Creates a new
Sort instance. |
Sort(Order... orders)
|
Sort(String... properties)
Creates a new
Sort instance. |
| Modifier and Type | Method and Description |
|---|---|
Sort |
and(Sort sort)
|
boolean |
equals(Object obj) |
Order |
getOrderFor(String property)
Returns the order registered for the given property.
|
List<Order> |
getOrders()
Returns all orders
|
int |
hashCode() |
Iterator<Order> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final Direction DEFAULT_DIRECTION
public Sort(Order... orders)
orders - must not be null.public Sort(List<Order> orders)
Sort instance.orders - must not be null or contain null.public Sort(String... properties)
Sort instance. Order defaults to
Direction.ASC.properties - must not be null or contain null
or empty stringspublic Sort(Direction direction, String... properties)
Sort instance.direction - defaults to DEFAULT_DIRECTION (for
null cases, too)properties - must not be null, empty or contain
null or empty strings.public Sort(Direction direction, List<String> properties)
Sort instance.direction - defaults to DEFAULT_DIRECTION (for
null cases, too)properties - must not be null or contain null
or empty strings.Copyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.