public class Sort extends Object implements Iterable<Sort.Order>, Serializable
DEFAULT_DIRECTION
.Modifier and Type | Class and Description |
---|---|
static class |
Sort.Direction
Enumeration for sort directions.
|
static class |
Sort.Order
PropertyPath implements the pairing of an
Sort.Direction and a property. |
Modifier and Type | Field and Description |
---|---|
static Sort.Direction |
DEFAULT_DIRECTION |
Constructor and Description |
---|
Sort(List<Sort.Order> orders)
Creates a new
Sort instance. |
Sort(Sort.Direction direction,
List<String> properties)
Creates a new
Sort instance. |
Sort(Sort.Direction direction,
String... properties)
Creates a new
Sort instance. |
Sort(Sort.Order... orders)
Creates a new
Sort instance using the given Sort.Order s. |
Sort(String... properties)
Creates a new
Sort instance. |
Modifier and Type | Method and Description |
---|---|
Sort |
and(Sort sort)
|
boolean |
equals(Object obj) |
Sort.Order |
getOrderFor(String property)
Returns the order registered for the given property.
|
int |
hashCode() |
Iterator<Sort.Order> |
iterator() |
String |
toString() |
public static final Sort.Direction DEFAULT_DIRECTION
public Sort(Sort.Order... orders)
Sort
instance using the given Sort.Order
s.orders
- must not be null.public Sort(List<Sort.Order> orders)
Sort
instance.orders
- must not be null or contain null.public Sort(String... properties)
Sort
instance. Order defaults to .properties
- must not be null or contain null or empty stringspublic Sort(Sort.Direction direction, String... properties)
Sort
instance.direction
- defaults to (for null cases, too)properties
- must not be null or contain null or empty stringspublic Sort(Sort.Direction direction, List<String> properties)
Sort
instance.direction
- properties
- public Sort.Order getOrderFor(String property)
property
- public Iterator<Sort.Order> iterator()
iterator
in interface Iterable<Sort.Order>
Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.