public class Sort extends Object implements Iterable<Sort.Order>, Serializable
Sort.| Modifier and Type | Class and Description |
|---|---|
static class |
Sort.Direction
Sort directions.
|
static class |
Sort.NullHandling
Enumeration for null handling of an
Sort.Order. |
static class |
Sort.Order
PropertyPath implements the pairing of an
Sort.Direction and a property. |
| Constructor and Description |
|---|
Sort(Collection<Sort.Order> orders)
Creates a new Sort with the given
Sort.Orders. |
Sort(Sort.Direction direction,
List<String> paths)
Creates a new Sort with the given paths and given direction.
|
Sort(Sort.Direction direction,
String... paths)
Creates a new Sort with the given paths the given direction.
|
Sort(Sort.Order... orders)
Creates a new Sort with the given
Sort.Orders. |
Sort(String... paths)
Creates a new Sort with the given paths and the
Sort.Direction.ASC. |
| Modifier and Type | Method and Description |
|---|---|
Sort |
and(Sort sort)
|
boolean |
equals(Object obj) |
Sort.Order |
getOrderFor(String path)
Returns the order for the given path or
null if there is none. |
int |
hashCode() |
Iterator<Sort.Order> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic Sort(Sort.Order... orders)
Sort.Orders.orders - The orders to use for sortingpublic Sort(Collection<Sort.Order> orders)
Sort.Orders.orders - The orders to use for sortingpublic Sort(String... paths)
Sort.Direction.ASC.paths - The paths by which to sortpublic Sort(Sort.Direction direction, String... paths)
direction - The direction to use for sortingpaths - The paths by which to sortpublic Sort(Sort.Direction direction, List<String> paths)
direction - The direction to use for sortingpaths - The paths by which to sortpublic Sort and(Sort sort)
sort - The other sort, may be nullSort.Orders of the given Sortpublic Sort.Order getOrderFor(String path)
null if there is none.path - The path for which to get the Sort.OrderSort.Order for the given path or null it there is nonepublic Iterator<Sort.Order> iterator()
iterator in interface Iterable<Sort.Order>Copyright © 2014–2018 Blazebit. All rights reserved.