public final class SortKey extends Object
Modifier and Type | Method and Description |
---|---|
static SortKey |
ascendingOrder(JsonPointer field)
Creates a new ascending-order sort key for the provided JSON field.
|
static SortKey |
ascendingOrder(String field)
Creates a new ascending-order sort key for the provided JSON field.
|
static SortKey |
descendingOrder(JsonPointer field)
Creates a new descending-order sort key for the provided JSON field.
|
static SortKey |
descendingOrder(String field)
Creates a new descending-order sort key for the provided JSON field.
|
boolean |
equals(Object obj) |
JsonPointer |
getField()
Returns the sort key field.
|
int |
hashCode() |
boolean |
isAscendingOrder()
Returns
true if this sort key is in ascending order, or
false if it is in descending order. |
static SortKey |
reverseOrder(SortKey key)
Creates a new sort key having the same field as the provided key, but in
reverse sort order.
|
String |
toString()
Returns the string representation of this sort key.
|
static SortKey |
valueOf(String s)
Parses the provided string as a sort key.
|
public static SortKey ascendingOrder(JsonPointer field)
field
- The sort key field.public static SortKey ascendingOrder(String field)
field
- The sort key field.IllegalArgumentException
- If field
is not a valid JSON pointer.public static SortKey descendingOrder(JsonPointer field)
field
- The sort key field.public static SortKey descendingOrder(String field)
field
- The sort key field.IllegalArgumentException
- If field
is not a valid JSON pointer.public static SortKey reverseOrder(SortKey key)
key
- The sort key to be reversed.public JsonPointer getField()
public boolean isAscendingOrder()
true
if this sort key is in ascending order, or
false
if it is in descending order.true
if this sort key is in ascending order, or
false
if it is in descending ord)er.public static SortKey valueOf(String s)
s
- The string representation of a sort key as specified in
SortKey.toString()
.IllegalArgumentException
- If s
is not a valid sort key.public String toString()
Copyright © 2010-2018, ForgeRock All Rights Reserved.