Class TableUtils


  • public class TableUtils
    extends Object
    • Constructor Detail

      • TableUtils

        public TableUtils()
    • Method Detail

      • sortTableByRowKeys

        public static <C,​V> com.google.common.collect.Table<Directional<String>,​C,​V> sortTableByRowKeys​(com.google.common.collect.Table<Directional<String>,​C,​V> table,
                                                                                                                          List<String> rowKeys)
        Given a table, sort the rows such that the row keys appear in the same order as the given list. Any additional rows should be appended after these in the same order that they appeared.
        Parameters:
        table - the table to sort
        rowKeys - list of row keys to match
        Returns:
        a sorted table