Is this by design ?
Map<String, Map<String, String>> rowMap = treeTable.rowMap();
Map<String, String> notSortedTreeRow = rowMap.get(rowId);
so that you can have rowMap sorted (as SortedMap) but you can’t have sorted notSortedTreeRow (TreeRow) which is [column, value] ?
EDIT: It was my fault, I had a String representation of Integers and I was on the impression that numerical Strings were compared based on the numerical value 🙂
Something like this if I oversimplify it:
TreeBasedTable<String, String, String> table = TreeBasedTable.create();
table.put("1", "8", "x");
table.put("1", "9", "x");
table.put("1", "10", "x");
Map<String,String> map = table.rowMap().get("1");
Just do:
as it is TreeRow object instance, which is SortedMap. It is guarateed by
RowSortedTableinterface, and it does not override Table’s rowMap argument, because it is not possible in Java.EDIT:
Answering original question here:
Yes, it’s by Java’s design.