Class CacheManager.HashKey

java.lang.Object
kong.unirest.core.CacheManager.HashKey
All Implemented Interfaces:
Cache.Key
Enclosing class:
CacheManager

private static class CacheManager.HashKey extends Object implements Cache.Key
  • Field Details

    • hash

      private final int hash
    • time

      private final Instant time
  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Cache.Key
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
      See Also:
    • hashCode

      public int hashCode()
      Description copied from interface: Cache.Key
      As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (The hashCode may or may not be implemented as some function of an object's memory address at some point in time.)
      Specified by:
      hashCode in interface Cache.Key
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
      See Also:
    • getTime

      public Instant getTime()
      Description copied from interface: Cache.Key
      The time the key was created to be used by purging functions
      Specified by:
      getTime in interface Cache.Key
      Returns:
      the time as an instant