public class OrderDefinition
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OrderDefinition.Direction
The direction enum defines the legal directions available, and a reverse helper method.
|
static interface |
OrderDefinition.OrderDefinitionVisitor |
Modifier and Type | Field and Description |
---|---|
static OrderDefinition |
NONE |
Constructor and Description |
---|
OrderDefinition()
Construct an order definition object.
|
Modifier and Type | Method and Description |
---|---|
OrderDefinition |
add(OrderDefinition.Direction[] dir,
java.lang.String... flds)
Add order definition field names with the specified Direction.
|
OrderDefinition |
add(OrderDefinition.Direction dir,
java.lang.String... flds)
Add order definition field names, all in the same direction
|
OrderDefinition |
add(java.lang.String... flds)
Add order definition field names, all ascending order
|
java.lang.String |
getDirectionsString() |
java.lang.String |
getFieldsString() |
OrderDefinition |
reverse()
Produce an OrderDefinition that is the exact opposite of this OrderDefinition.
|
java.lang.String |
toString()
Produce a human readable representation of the OrderDefinition
|
void |
traverseOrderDefinition(OrderDefinition.OrderDefinitionVisitor v) |
public static final OrderDefinition NONE
public OrderDefinition()
OrderDefinition.add(java.lang.String...)
methods to add fields and
directions to the sort.public OrderDefinition add(java.lang.String... flds)
flds
- the field names you wish to order on, first field being highest precedence.public OrderDefinition add(OrderDefinition.Direction dir, java.lang.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, java.lang.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 java.lang.String getFieldsString()
public java.lang.String getDirectionsString()
public java.lang.String toString()
toString
in class java.lang.Object
public OrderDefinition reverse()
public void traverseOrderDefinition(OrderDefinition.OrderDefinitionVisitor v)