Package kong.unirest.core
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 java.lang.Object implements Cache.Key
-
-
Constructor Summary
Constructors Constructor Description HashKey(int hash, java.time.Instant time)
HashKey(HttpRequest request, java.lang.Boolean isAsync, java.lang.Class<?> responseType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.time.Instant
getTime()
The time the key was created to be used by purging functionsint
hashCode()
As much as is reasonably practical, the hashCode method defined by classObject
does return distinct integers for distinct objects.
-
-
-
Constructor Detail
-
HashKey
HashKey(HttpRequest request, java.lang.Boolean isAsync, java.lang.Class<?> responseType)
-
HashKey
HashKey(int hash, java.time.Instant time)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfaceCache.Key
- Overrides:
equals
in classjava.lang.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:
Cache.Key.hashCode()
,HashMap
-
hashCode
public int hashCode()
Description copied from interface:Cache.Key
As much as is reasonably practical, the hashCode method defined by classObject
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.)
-
-