Package tech.tablesaw.sorting
Class SortUtils
- java.lang.Object
-
- tech.tablesaw.sorting.SortUtils
-
public class SortUtils extends Object
Static utility class that provides Comparators for sorting
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IntComparatorChaingetChain(Table table, Sort key)Returns a comparator chain for sorting according to the given keystatic it.unimi.dsi.fastutil.ints.IntComparatorgetComparator(Table table, Sort key)Returns a comparator that can be used to sort the records in this table according to the given sort keystatic it.unimi.dsi.fastutil.ints.IntComparatorrowComparator(Column<?> column, Sort.Order order)Returns a comparator for the column matching the specified name
-
-
-
Method Detail
-
getChain
public static IntComparatorChain getChain(Table table, Sort key)
Returns a comparator chain for sorting according to the given key
-
rowComparator
public static it.unimi.dsi.fastutil.ints.IntComparator rowComparator(Column<?> column, Sort.Order order)
Returns a comparator for the column matching the specified name- Parameters:
column- The column to sortorder- Specifies whether the sort should be in ascending or descending order
-
-