|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.collab.Sort
Represents a list of fields to sort on, with the earlier properties having higher sort priority.
Constructor Summary | |
Sort()
Constructs an empty Sort . |
|
Sort(SortProperty field)
Constructs a Sort with one field. |
|
Sort(SortProperty[] fields)
Constructs a Sort with multiple fields. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
java.util.Comparator |
getComparator()
Creates a comparator that can sort items based on this sort. |
java.util.Comparator |
getComparator(java.text.Collator collator)
Creates a comparator that can sort items based on this sort. |
int |
getFieldCount()
Get the number of fields in this Sort . |
int |
hashCode()
|
boolean |
isEmpty()
Determines if the sort contains no sort fields. |
void |
sortItemArray(IItem[] itemArray)
Sorts an array of items based on this sort. |
void |
sortItemArray(IItem[] itemArray,
java.text.Collator collator)
Sorts an array of items based on this sort. |
void |
sortItemList(java.util.List itemList)
Sorts a list of items based on this sort. |
void |
sortItemList(java.util.List itemList,
java.text.Collator collator)
Sorts a list of items based on this sort. |
SortProperty[] |
toArray()
Gets an array representing the fields of this Sort . |
java.lang.String |
toString()
|
void |
updateDigest(java.security.MessageDigest digest)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Sort()
Sort
.
public Sort(SortProperty[] fields)
Sort
with multiple fields.
fields
- the fields to sort on; earlier ones have higher priority
(not null
)public Sort(SortProperty field)
Sort
with one field.
field
- the sort field (not null
)Method Detail |
public java.util.Comparator getComparator()
null
)ItemComparator.ItemComparator(SortProperty[])
public java.util.Comparator getComparator(java.text.Collator collator)
collator
- the Collator
to use for
String
comparisons (null
for the
default Collator
)
null
)ItemComparator.ItemComparator(SortProperty[])
public void sortItemList(java.util.List itemList)
itemList
- the list of items to sort (not null
)getComparator()
public void sortItemList(java.util.List itemList, java.text.Collator collator)
itemList
- the list of items to sort (not null
)collator
- the Collator
to use for
String
comparisons (null
for the
default Collator
)getComparator()
public void sortItemArray(IItem[] itemArray)
itemArray
- the array of items to sort (not null
)getComparator()
,
(Object[], Comparator)
public void sortItemArray(IItem[] itemArray, java.text.Collator collator)
itemArray
- the array of items to sort (not null
)collator
- the Collator
to use for
String
comparisons (null
for the
default Collator
)getComparator()
,
(Object[], Comparator)
public SortProperty[] toArray()
Sort
.
SortProperty
(not null
)public int getFieldCount()
Sort
.
SortProperty
s in this Sort
public boolean isEmpty()
true
if the sort contains no sort fieldspublic boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
public int hashCode()
Object.hashCode()
public java.lang.String toString()
public void updateDigest(java.security.MessageDigest digest)
updateDigest
in interface com.compoze.collab.util.IDigestSupport
|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |