i guess you just need to have nested treemap only.
Also Create an element class with 2 attributes: key and value
something like
TreeMap parentTM = new TreeMap();
TreeMap childTM1 = new TreeMap();
TreeMap childTM2 = new TreeMap();
Element elem1 = new Element(key, value);
...
// Put elements to the map
childTM1.put("1", elem1 );
childTM1.put("2", elem2 );
childTM2.put("1", elem1 );
childTM2.put("2", elem2 );
parentTM.put("1", childTM1 );
parentTM.put("2", childTM2 );