Java: Last access of 2D HashMap
- by JamieFlowers
I have the following structure:
HashMap< String, HashMap< String, String
Now i want to know the last accessed element in the 2nd dimension.
I know there is TreeMap which makes sense in the 1rst dimension but after that it doesn't make any sense.
How can I keep track of a 2D HashMap ordering?
With access i mean:
value = hashmap.get("a").get("1")
value = hashmap.get("b").get("2")
value = hashmap.get("c").get("3")
hashmap.removeLast();
hashmap.removeLast();
hashmap.removeLast();