Class Cache<K,​V>

  • Type Parameters:
    K - The type of the index of the cache.
    V - The type of the objects of the cache.
    All Implemented Interfaces:
    Serializable, Cloneable, Map<K,​V>

    public class Cache<K,​V>
    extends LinkedHashMap<K,​V>
    Cache implementation. This cache stores a maximum of objects, deleting the least recently used ones.
    See Also:
    Serialized Form
    • Field Detail

      • maxSize

        protected final long maxSize
        The maximum size this cache should have
    • Constructor Detail

      • Cache

        public Cache​(long size)
        Constructor, taking the size of the cache as argument.
        Parameters:
        size -