com.jaxfront.core.util.sort
Class TableColumnComparator
java.lang.Object
com.jaxfront.core.util.sort.TableColumnComparator
- All Implemented Interfaces:
- java.util.Comparator
public class TableColumnComparator
- extends java.lang.Object
- implements java.util.Comparator
- Author:
- SRZXUZ TODO To change the template for this generated type comment go
to Window - Preferences - Java - Code Style - Code Templates
Method Summary |
int |
compare(java.lang.Object row1,
java.lang.Object row2)
|
int |
compareTyped(java.lang.Object o1,
java.lang.Object o2,
java.lang.Class columnClass)
Compares rows by column. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
TableColumnComparator
public TableColumnComparator(java.lang.Class columnClass,
int column,
boolean ascending)
compareTyped
public int compareTyped(java.lang.Object o1,
java.lang.Object o2,
java.lang.Class columnClass)
- Compares rows by column.
- Parameters:
row1
- the first row indexrow2
- the second row indexcolumn
- the column index
- Returns:
- either -1, 0 or 1 (-1 if row1 comes before row2, 0 if the are
equal or null, 1 if row2 comes before row1)
compare
public int compare(java.lang.Object row1,
java.lang.Object row2)
- Specified by:
compare
in interface java.util.Comparator