Class CacheableLong

java.lang.Object
org.deltava.util.cache.CacheableLong
All Implemented Interfaces:
Serializable, Cacheable

public class CacheableLong extends Object implements Cacheable
A utility class to create a cacheable Long.
Since:
1.0
Version:
11.0
Author:
Luke
See Also:
  • Constructor Details

    • CacheableLong

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

    • cacheKey

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

      public long getValue()
      Returns the value.
      Returns:
      the value
    • intValue

      public int intValue()
      Returns the value as a 32-bit integer.
      Returns:
      an int
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object