What would be the best way to implement a most-recently-used cache of objects?
Here are the requirements and restrictions...
Why implement something already implemented? Use Ehcache.
However, if third-party libraries are totally out of the question, I guess you are looking to implement a data structure which looks something like this:
HashMap if you will)O(1)O(1)