|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.api.support.SortDirective
public final class SortDirective
This class describes sorts - it contains list of couples [DFField, boolean flag asc/desc]
SortDirective is immutable object - once it is created it cannot be changed. You need to create
a new one if you want to add new DFField or change asc/desc flag.
| Nested Class Summary | |
|---|---|
static class |
SortDirective.Item
Represents one item in SortDirective, it means a single couple [DFField, boolean flag asc/desc]. |
| Field Summary | |
|---|---|
static SortDirective |
EMPTY
Empty sort constant |
| Method Summary | |
|---|---|
static SortDirective |
create(DFField[] fields,
boolean[] ascendings)
Create a complex SortDirective for more fields. |
static SortDirective |
create(DFField field,
boolean isAscending)
Create SortDirective if you want to sort only a single field. |
boolean |
equals(Object obj)
|
List<DFField> |
getFields()
Get all fields which participates in this SortDirective. |
List<SortDirective.Item> |
getSorts()
Get list of pairs [DFField, asc/desc] |
int |
hashCode()
|
static SortDirective |
merge(SortDirective sort,
DFField field,
boolean ascending)
Utility method for adding one or more field to existing SortDirective. |
static SortDirective |
removeFields(SortDirective sort,
List<DFField> fields)
Utility method for removing one field from the existing SortDirective. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final SortDirective EMPTY
| Method Detail |
|---|
public static SortDirective create(DFField field,
boolean isAscending)
public static SortDirective create(DFField[] fields,
boolean[] ascendings)
IllegalArgumentException - is thrown when the lengths of arrays are different
public static SortDirective merge(SortDirective sort,
DFField field,
boolean ascending)
public static SortDirective removeFields(SortDirective sort,
List<DFField> fields)
public List<DFField> getFields()
public List<SortDirective.Item> getSorts()
public boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Object
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||