Class LRUCache<K,​V>


  • public class LRUCache<K,​V>
    extends java.lang.Object
    Normal LRU cache based on LinkedHashMap.
    Author:
    thomas.jungblut
    • Constructor Summary

      Constructors 
      Constructor Description
      LRUCache​(int cacheSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V get​(K key)  
      void put​(K key, V value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LRUCache

        public LRUCache​(int cacheSize)
    • Method Detail

      • get

        public V get​(K key)
      • put

        public void put​(K key,
                        V value)