Class LruCache<A,​B>

  • Type Parameters:
    A - Key element class
    B - Value element class

    public class LruCache<A,​B>
    extends Object
    Class that implements a simple LRU cache with specified max entries.
    • Constructor Detail

      • LruCache

        public LruCache​(int theMaxEntries)
        LruCache constructor
        Parameters:
        theMaxEntries - Maximum entries in Cache.
    • Method Detail

      • put

        public B put​(A key,
                     B value)
      • get

        public B get​(A key)
      • remove

        public B remove​(A key)
      • containsKey

        public boolean containsKey​(A key)
      • containsValue

        public boolean containsValue​(B value)
      • isEmpty

        public boolean isEmpty()
      • putAll

        public void putAll​(Map<? extends A,​? extends B> m)
      • clear

        public void clear()