java.io.Serializablepublic static class Sort.Order
extends java.lang.Object
implements java.io.Serializable
Sort.Direction and a property. It is used to provide input for
Sort| Constructor | Description |
|---|---|
Order(Sort.Direction direction,
java.lang.String path) |
Creates a new
Sort.Order with the given direction and path. |
Order(Sort.Direction direction,
java.lang.String path,
Sort.NullHandling nullHandling) |
Creates a new
Sort.Order with the given direction, path and null handling. |
Order(java.lang.String path) |
Creates a new
Sort.Order with the given path and Sort.Direction.ASC. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendTo(java.lang.StringBuilder sb) |
Appends the string representation to the given
StringBuilder. |
boolean |
equals(java.lang.Object obj) |
|
Sort.Direction |
getDirection() |
Returns the sort direction.
|
Sort.NullHandling |
getNullHandling() |
Returns the
Sort.NullHandling. |
java.lang.String |
getPath() |
Returns the path of the Sort.Order.
|
int |
hashCode() |
|
Sort.Order |
ignoreCase() |
Returns a new
Sort.Order with case insensitive sorting enabled. |
boolean |
isAscending() |
Returns whether sorting for this property should be ascending.
|
boolean |
isDescending() |
Returns whether sorting for this path should be descending.
|
boolean |
isIgnoreCase() |
Returns whether or not the sort will be case sensitive.
|
Sort.Order |
nullsFirst() |
Returns a new
Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling. |
Sort.Order |
nullsLast() |
Returns a new
Sort.Order with Sort.NullHandling.NULLS_LAST as null handling. |
Sort.Order |
nullsNative() |
Returns a new
Sort.Order with Sort.NullHandling.NATIVE as null handling. |
java.lang.String |
toString() |
|
Sort.Order |
with(Sort.Direction direction) |
Returns a new
Sort.Order with the given Sort.Direction. |
Sort.Order |
with(Sort.NullHandling nullHandling) |
Returns a new
Sort.Order with the given Sort.NullHandling. |
Sort.Order |
withPath(java.lang.String path) |
Returns a new
Sort.Order with the same configuration as this Sort.Order, but the given path. |
public Order(Sort.Direction direction, java.lang.String path)
Sort.Order with the given direction and path.direction - The Sort.Direction to use, defaults to Sort.Direction.ASC if nullpath - The path to sort bypublic Order(Sort.Direction direction, java.lang.String path, Sort.NullHandling nullHandling)
Sort.Order with the given direction, path and null handling.direction - The Sort.Direction to use, defaults to Sort.Direction.ASC if nullpath - The path to sort bynullHandling - The Sort.NullHandling to use, defaults to Sort.NullHandling.NATIVE if nullpublic Order(java.lang.String path)
Sort.Order with the given path and Sort.Direction.ASC.path - The path to sort bypublic Sort.Direction getDirection()
public java.lang.String getPath()
public boolean isAscending()
true if sorting is ascending, false otherwisepublic boolean isDescending()
true if sorting is descending, false otherwisepublic boolean isIgnoreCase()
true if case insensitive, false otherwisepublic Sort.Order with(Sort.Direction direction)
Sort.Order with the given Sort.Direction.direction - The Sort.Direction to use, defaults to Sort.Direction.ASC if nullSort.Order with the given Sort.Directionpublic Sort.Order withPath(java.lang.String path)
Sort.Order with the same configuration as this Sort.Order, but the given path.path - The pathSort.Order with the same configuration as this Sort.Order, but the given pathpublic Sort.Order ignoreCase()
Sort.Order with case insensitive sorting enabled.Sort.Order with case insensitive sorting enabledpublic Sort.Order with(Sort.NullHandling nullHandling)
Sort.Order with the given Sort.NullHandling.nullHandling - The Sort.NullHandling to use, defaults to Sort.NullHandling.NATIVE if nullSort.Order with the given Sort.NullHandlingpublic Sort.Order nullsFirst()
Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling.Sort.Order with Sort.NullHandling.NULLS_FIRST as null handlingpublic Sort.Order nullsLast()
Sort.Order with Sort.NullHandling.NULLS_LAST as null handling.Sort.Order with Sort.NullHandling.NULLS_LAST as null handlingpublic Sort.Order nullsNative()
Sort.Order with Sort.NullHandling.NATIVE as null handling.Sort.Order with Sort.NullHandling.NATIVE as null handlingpublic Sort.NullHandling getNullHandling()
Sort.NullHandling.Sort.NullHandlingpublic void appendTo(java.lang.StringBuilder sb)
StringBuilder.sb - The StringBuilder to append topublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2019 Blazebit. All rights reserved.