Class CacheWrapper<T>

java.lang.Object
org.deltava.util.cache.CacheWrapper<T>
Type Parameters:
T - the cacheable object type
All Implemented Interfaces:
Serializable, Cacheable

public class CacheWrapper<T> extends Object implements Cacheable
A utility class to create a cacheable Object.
Since:
6.0
Version:
7.2
Author:
Luke
See Also:
  • Constructor Details

    • CacheWrapper

      public CacheWrapper(Object cacheKey, T value)
      Creates the Object.
      Parameters:
      cacheKey - the cache key
      value - the long value
  • Method Details

    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • getValue

      public T getValue()
      Returns the value.
      Returns:
      the value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object