A
Map
implementation with a fixed maximum size which removes the least recently used entry if an entry is added when full.
The least recently used algorithm works on the get and put operations only. Iteration of any kind, including setting the value by iteration, does not change the order. Queries such as containsKey and containsValue or access via views also do not change the order.
The map implements
OrderedMap
and entries may be queried using the bidirectional
OrderedMapIterator
. The order returned is least recently used to most recently used. Iterators from map views can also be cast to
OrderedIterator
if required.
All the available iterators can be reset back to the start by casting to
ResettableIterator
and calling
reset()
.
@author James Strachan
@author Morgan Delagrange
@author Stephen Colebourne
@author Mike Pettypiece
@author Matt Hall, John Watkinson, Mario Ivankovits
@version $Revision: 1.1 $ $Date: 2005/10/11 17:05:32 $
@since Commons Collections 3.0 (previously in main package v1.0)