Class MapCache<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
edu.umd.cs.findbugs.util.MapCache<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
Direct Known Subclasses:
ProfilingMapCache

public class MapCache<K,V> extends LinkedHashMap<K,V>
Provide a HashMap that can only grow to a specified maximum capacity, with entries discarded using a LRU policy to keep the size of the HashMap within that bound.
Author:
pugh
See Also:
  • Constructor Details

    • MapCache

      public MapCache(int maxCapacity)
      Create a new MapCache
      Parameters:
      maxCapacity - - maximum number of entries in the map
  • Method Details