Class MostRecentlyUsedMap<K,​V>

  • Type Parameters:
    K - key type
    V - value type
    All Implemented Interfaces:
    Serializable, Cloneable, Map<K,​V>

    public class MostRecentlyUsedMap<K,​V>
    extends LinkedHashMap<K,​V>
    Holds a map of most recently used items of a given maximum size. Old entries are expired when the map exceeds that maximum size.
    Author:
    Jonathan Locke
    See Also:
    Serialized Form
    • Field Detail

      • removedValue

        protected V removedValue
        Value most recently removed from map
    • Constructor Detail

      • MostRecentlyUsedMap

        public MostRecentlyUsedMap​(int maxEntries)
        Constructor
        Parameters:
        maxEntries - Maximum number of entries allowed in the map