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 booleanequals(java.lang.Object o)java.time.InstantgetTime()The time the key was created to be used by purging functionsinthashCode()As much as is reasonably practical, the hashCode method defined by classObjectdoes 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:
equalsin interfaceCache.Key- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the reference object with which to compare.- Returns:
trueif this object is the same as the obj argument;falseotherwise.- See Also:
Cache.Key.hashCode(),HashMap
-
hashCode
public int hashCode()
Description copied from interface:Cache.KeyAs much as is reasonably practical, the hashCode method defined by classObjectdoes 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.)
-
-