public static IntComparator getComparator ( Table table , Sort key ) { Iterator < Map . Entry < String , Sort . Order > > entries = key . iterator ( ) ; Map . Entry < String , Sort . Order > sort = entries . next ( ) ; Column < ? > column = table . column ( sort . getKey ( ) ) ; return SortUtils . rowComparator ( column , sort . getValue ( ) ) ; }
Returns a comparator that can be used to sort the records in this table according to the given sort key