public class OrderDefinition extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OrderDefinition.Direction
The direction enum defines the legal directions available, and a reverse helper method.
|
Constructor and Description |
---|
OrderDefinition()
Construct an order definition object.
|
Modifier and Type | Method and Description |
---|---|
OrderDefinition |
add(OrderDefinition.Direction[] dir,
String... flds)
Add order definition field names with the specified Direction.
|
OrderDefinition |
add(OrderDefinition.Direction dir,
String... flds)
Add order definition field names, all in the same direction
|
OrderDefinition |
add(String... flds)
Add order definition field names, all ascending order
|
OrderDefinition |
reverse()
Produce an OrderDefinition that is the exact opposite of this OrderDefinition.
|
String |
toString()
Produce a human readable representation of the OrderDefinition
|
public OrderDefinition()
OrderDefinition.add(java.lang.String...)
methods to add fields and
directions to the sort.public OrderDefinition add(String... flds)
flds
- the field names you wish to order on, first field being highest precedence.public OrderDefinition add(OrderDefinition.Direction dir, String... flds)
dir
- the Direction you want to use for these fields.flds
- the field names you wish to order on, first field being highest precedence.public OrderDefinition add(OrderDefinition.Direction[] dir, String... flds)
dir
- the Direction you want to use for each fieldflds
- the field names you wish to order on, first field being highest precedence.public String toString()
public OrderDefinition reverse()