Class LruCache<K,​V>

  • All Implemented Interfaces:
    Cache<K,​V>

    public final class LruCache<K,​V>
    extends Object
    implements Cache<K,​V>
    • Constructor Detail

      • LruCache

        public LruCache​(int maxCapacity)
    • Method Detail

      • containsKey

        public boolean containsKey​(K key)
        Specified by:
        containsKey in interface Cache<K,​V>
      • get

        public V get​(K key)
        Specified by:
        get in interface Cache<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface Cache<K,​V>
      • size

        public long size()