java.io.Serializable, java.lang.Iterable<Sort.Order>public class Sort extends java.lang.Object implements java.lang.Iterable<Sort.Order>, java.io.Serializable
Sort.| Modifier and Type | Class | 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 | Description |
|---|---|
Sort(Sort.Direction direction,
java.lang.String... paths) |
Creates a new Sort with the given paths the given direction.
|
Sort(Sort.Direction direction,
java.util.List<java.lang.String> paths) |
Creates a new Sort with the given paths and given direction.
|
Sort(Sort.Order... orders) |
Creates a new Sort with the given
Sort.Orders. |
Sort(java.lang.String... paths) |
Creates a new Sort with the given paths and the
Sort.Direction.ASC. |
Sort(java.util.Collection<Sort.Order> orders) |
Creates a new Sort with the given
Sort.Orders. |
| Modifier and Type | Method | Description |
|---|---|---|
Sort |
and(Sort sort) |
|
boolean |
equals(java.lang.Object obj) |
|
Sort.Order |
getOrderFor(java.lang.String path) |
Returns the order for the given path or
null if there is none. |
int |
hashCode() |
|
java.util.Iterator<Sort.Order> |
iterator() |
|
java.lang.String |
toString() |
public Sort(Sort.Order... orders)
Sort.Orders.orders - The orders to use for sortingpublic Sort(java.util.Collection<Sort.Order> orders)
Sort.Orders.orders - The orders to use for sortingpublic Sort(java.lang.String... paths)
Sort.Direction.ASC.paths - The paths by which to sortpublic Sort(Sort.Direction direction, java.lang.String... paths)
direction - The direction to use for sortingpaths - The paths by which to sortpublic Sort(Sort.Direction direction, java.util.List<java.lang.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(java.lang.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 java.util.Iterator<Sort.Order> iterator()
iterator in interface java.lang.Iterable<Sort.Order>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2018 Blazebit. All rights reserved.