|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ge.research.acuity.utils.SelectionListSortComparator
Comparator for SelectionPO choices
that allows for selection value/label pairs to be sorted by either value or label.
Choices must be in an Object[] of size >=2
| Constructor Summary | |
SelectionListSortComparator(int index,
boolean sortDescending)
Creates a new SelectionListSortComparator with prioritized sort columns, and current sort column index and sort orientation flag |
|
| Method Summary | |
int |
compare(java.lang.Object o1List,
java.lang.Object o2List)
Compares two selection list choices. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
| Constructor Detail |
public SelectionListSortComparator(int index,
boolean sortDescending)
index - the array index to perform the sorting on
0 to sort on values, 1 to sort on labelssortDescending - A flag indicating to sort in DESCending fashion if true, ASCending fashion if false| Method Detail |
public int compare(java.lang.Object o1List,
java.lang.Object o2List)
java.lang.Object[]
containing the value/label data for the selection choice. The item at the current useIndex
position within both arrays are extracted and compared. Depending on the type of data extracted
and the value of the sortDescending flag, the values are compared and the method returns
a -1 if o1List should come after o2List, 0 if o1List and o2List are equal,
and 1 if o1List should come before o2List
compare in interface java.util.ComparatorComparator.compare(java.lang.Object, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||