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()
.
@since Commons Collections 3.0 (previously in main package v1.0)
@version $Revision: 1.14 $ $Date: 2004/06/07 22:13:53 $
@author James Strachan
@author Morgan Delagrange
@author Stephen Colebourne
@author Mike Pettypiece
@author Mario Ivankovits