Class Cache<K,​V extends Cache.Value>

  • public class Cache<K,​V extends Cache.Value>
    extends java.lang.Object
    • Method Detail

      • put

        public void put​(K key,
                        V value)
      • replace

        public V replace​(K key,
                         V value)
        Get the element in the cache if one exists, or add it to the cache if not.
        key - the key
        value - the value
        the cached element
      • get

        public V get​(K key)
      • clear

        public void clear()
      • size

        public int size()
      • getMemoryUsed

        public int getMemoryUsed()
      • getMemoryMax

        public int getMemoryMax()