Class 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.
    • 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.
      • 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • 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 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 java.util.Comparator<java.lang.Object>