Class MapBackedCache<K,​V>

  • All Implemented Interfaces:
    Cache<K,​V>
    Direct Known Subclasses:
    ObjectCache

    public class MapBackedCache<K,​V>
    extends Object
    implements Cache<K,​V>
    • Field Detail

      • map

        protected final Map<K,​V> map
    • Constructor Detail

      • MapBackedCache

        public MapBackedCache​(Map<K,​V> map)
    • Method Detail

      • put

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

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

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

        public void clear()
        Specified by:
        clear in interface Cache<K,​V>