Class LruCache<K,​V>

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

    public final class LruCache<K,​V>
    extends LinkedHashMap<K,​V>
    Simple LRUCache implementation based off of linked hash map
    See Also:
    Serialized Form
    • Constructor Detail

      • LruCache

        public LruCache​(int maxEntries)
        Create an LRU cache with the given max number of entries
        Parameters:
        maxEntries - the max number of entries