Class CacheableMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.deltava.util.cache.CacheableMap<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>, SequencedMap<K,V>, Cacheable

public class CacheableMap<K,V> extends LinkedHashMap<K,V> implements Cacheable
A utility class to create a cacheable Map.
Since:
2.2
Version:
7.2
Author:
Luke
See Also:
  • Constructor Details

    • CacheableMap

      public CacheableMap(Object key)
      Initializes the cachable map.
      Parameters:
      key - the cache key
  • Method Details

    • cacheKey

      public Object cacheKey()
      Returns the cache key.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object