Package com.jsql.view.swing.table
Class ComparatorColumn<T>
java.lang.Object
com.jsql.view.swing.table.ComparatorColumn<T>
- All Implemented Interfaces:
Comparator<T>
Comparator for table column values ; column with only int data is sorted like 3 lt 20 lt 100,
column with string will sort like 100 gt 20 gt 3 gt abc.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ComparatorColumn
public ComparatorColumn()
-
-
Method Details
-
compare
Custom compare to sort numbers as numbers. Strings as strings, with numbers ordered before strings.- Specified by:
comparein interfaceComparator<T>
-