Java: Last access of 2D HashMap

Posted by JamieFlowers on Stack Overflow See other posts from Stack Overflow or by JamieFlowers
Published on 2012-09-20T09:24:57Z Indexed on 2012/09/20 9:37 UTC
Read the original article Hit count: 429

Filed under:
|

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();

© Stack Overflow or respective owner

Related posts about java

Related posts about hashmap