public class SortingImpl extends java.lang.Object implements Sorting
Sorting.DEFAULT_DIRECTION.
See Spring Data Commons, but more flat design and independent of Spring libraries.Sorting.BuilderDEFAULT_DIRECTION| Constructor | Description |
|---|---|
SortingImpl() |
|
SortingImpl(Direction direction,
java.lang.String... properties) |
Creates a new
Sorting instance. |
SortingImpl(Direction direction,
java.util.List<java.lang.String> properties) |
Creates a new
Sorting instance. |
SortingImpl(Order... orders) |
|
SortingImpl(java.lang.String... properties) |
Creates a new
Sorting instance. |
SortingImpl(java.util.List<Order> orders) |
Creates a new
Sorting instance. |
| Modifier and Type | Method | Description |
|---|---|---|
Sorting |
and(Sorting sort) |
Returns a new
SortingImpl consisting of the Orders of the current SortingImpl combined with the given
ones. |
boolean |
equals(java.lang.Object obj) |
|
Order |
getOrderFor(java.lang.String property) |
Returns the order registered for the given property.
|
java.util.List<Order> |
getOrders() |
|
int |
hashCode() |
|
java.util.Iterator<Order> |
iterator() |
|
void |
setOrders(java.util.List<Order> orders) |
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic SortingImpl()
public SortingImpl(Order... orders)
orders - must not be null.public SortingImpl(java.util.List<Order> orders)
Sorting instance.orders - must not be null or contain null.public SortingImpl(java.lang.String... properties)
Sorting instance. Order defaults to Direction#ASC.properties - must not be null or contain null or empty stringspublic SortingImpl(Direction direction, java.lang.String... properties)
Sorting instance.direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)properties - must not be null, empty or contain null or empty strings.public SortingImpl(Direction direction, java.util.List<java.lang.String> properties)
Sorting instance.direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)properties - must not be null or contain null or empty strings.public java.util.List<Order> getOrders()
public void setOrders(java.util.List<Order> orders)
public Sorting and(Sorting sort)
SortingImpl consisting of the Orders of the current SortingImpl combined with the given
ones.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Order getOrderFor(java.lang.String property)
getOrderFor in interface Sortingproperty - given propertypublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.Iterator<Order> iterator()
iterator in interface java.lang.Iterable<Order>public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.