Class SortUtils


  • public class SortUtils
    extends Object
    Static utility class that provides Comparators for sorting
    • 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 sort
        order - Specifies whether the sort should be in ascending or descending order
      • getComparator

        public static it.unimi.dsi.fastutil.ints.IntComparator getComparator​(Table table,
                                                                             Sort key)
        Returns a comparator that can be used to sort the records in this table according to the given sort key