Sorting Guava tables in descending order based on values
问题 I am planning to use guava tables for storing my values in the table format. I would like to know some function which performs the descending order sorting based on the value in the table ... Could you people throw some views about this. Thank you. 回答1: Just like with maps, you should copy the cellSet() , sort the cells by the values, and then put that into an order-preserving ImmutableTable . Ordering<Table.Cell<String, String, Integer>> comparator = new Ordering<Table.Cell<String, String,