Package org.apache.pivot.wtk.content
Class TableViewRowComparator
- java.lang.Object
-
- org.apache.pivot.wtk.content.TableViewRowComparator
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.Object>
public class TableViewRowComparator extends java.lang.Object implements java.util.Comparator<java.lang.Object>
Compares two rows in a table view.
-
-
Constructor Summary
Constructors Constructor Description TableViewRowComparator(TableView tableView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
Compares two rows in a table view.
-
-
-
Constructor Detail
-
TableViewRowComparator
public TableViewRowComparator(TableView tableView)
-
-
Method Detail
-
compare
public int compare(java.lang.Object o1, java.lang.Object o2)
Compares two rows in a table view. If the column values implementComparable
, theComparable.compareTo(Object)
method will be used to compare the values. Otherwise, the values will be compared as strings usingObject.toString()
. If either value isnull
, it will be considered as less than the other value. If both values arenull
, they will be considered equal.- Specified by:
compare
in interfacejava.util.Comparator<java.lang.Object>
-
-