table.put(4, 1);
KeyValueTable kvTable = new KeyValueTable(table);
print(kvTable);
kvTable.sortByKey();print(kvTable);
kvTable.sortByValue();print(kvTable);
}
public static void print(KeyValueTable<?,?> table) {
for (KeyValue<?, ?> index : table.getKeyValues())
System.out.print("[" + index.key + " : " + index.value + "]\n");