|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.compoze.collab.Sort
public class 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(Object obj)
|
Comparator |
getComparator()
Creates a comparator that can sort items based on this sort. |
Comparator |
getComparator(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,
Collator collator)
Sorts an array of items based on this sort. |
void |
sortItemList(List itemList)
Sorts a list of items based on this sort. |
void |
sortItemList(List itemList,
Collator collator)
Sorts a list of items based on this sort. |
SortProperty[] |
toArray()
Gets an array representing the fields of this Sort. |
String |
toString()
|
void |
updateDigest(MessageDigest digest)
Updates the specified MessageDigest with the object's internal state. |
| 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 Comparator getComparator()
null)ItemComparator.ItemComparator(SortProperty[])public Comparator getComparator(Collator collator)
collator - the Collator to use for
String comparisons (null for the
default Collator)
null)ItemComparator.ItemComparator(SortProperty[])public void sortItemList(List itemList)
itemList - the list of items to sort (not null)getComparator()
public void sortItemList(List itemList,
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,
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.
SortPropertys in this Sortpublic boolean isEmpty()
true if the sort contains no sort fieldspublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class Objectpublic void updateDigest(MessageDigest digest)
IDigestSupport
updateDigest in interface IDigestSupportdigest - the digest to update (not null)
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||