org.apache.pivot.wtk.content
Class TableViewRowComparator
java.lang.Object
org.apache.pivot.wtk.content.TableViewRowComparator
- All Implemented Interfaces:
- Comparator<Object>
public class TableViewRowComparator
- extends Object
- implements Comparator<Object>
Compares two rows in a table view.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableViewRowComparator
public TableViewRowComparator(TableView tableView)
compare
public int compare(Object o1,
Object o2)
- Compares two rows in a table view. If the column values implement
Comparable, the Comparable.compareTo(Object) method will be used
to compare the values. Otherwise, the values will be compared as strings using
Object.toString(). If either value is null, it will be
considered as less than the other value. If both values are null, they
will be considered equal.
- Specified by:
compare in interface Comparator<Object>