|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ge.research.acuity.utils.TableSortComparator
Comparator for TablePO objects
that allows for rows of a table to be sorted based upon the values of specified columns
| Constructor Summary | |
TableSortComparator(java.util.List colInfo,
int sortCol)
Creates a new TableSortComparator for a TablePO object
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 rows within a TablePO data.
|
| 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 TableSortComparator(java.util.List colInfo,
int sortCol)
TablePO object
with prioritized sort columns, and current sort column index and sort orientation flag
colInfo - the list of TableColumnInfo objects
representing the information about the columns of the table, including sort order, and sort methodsortCol - the current column info index to use| Method Detail |
public int compare(java.lang.Object o1List,
java.lang.Object o2List)
TablePO data.
The comparator checks to make sure that each argument is a List
containing the data for each column of the row. The item at the current sortCol
position within both lists 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 | |||||||||