The LinkedHashMap seems like a nice class for implementing a LRU map, and it
is.
However when you try to use it to actually access the most recently used
<key, value> with the appropriate constructor, its easy to see that the
order of iteration is from the least recently used to the most recently
used.

To access the most recent item you must either iterate over n keys or
toArray() (even worse).

Is there another easy solution in java 1.5 (in the collections framework)?

Reply via email to