public final class ObjectKey extends java.lang.Object implements Key
Object
, delegating equals(Object)
and hashCode()
to
the wrapped Object and providing the bytes of the result of the Object's toString()
method to the MessageDigest
in updateDiskCacheKey(java.security.MessageDigest)
.
The Object's toString()
method must be unique and suitable for use as a disk cache
key.
CHARSET, STRING_CHARSET_NAME
Constructor and Description |
---|
ObjectKey(java.lang.Object object) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
For caching to work correctly, implementations must implement this method and
Key.hashCode() . |
int |
hashCode()
For caching to work correctly, implementations must implement this method and
Key.equals(Object) . |
java.lang.String |
toString() |
void |
updateDiskCacheKey(java.security.MessageDigest messageDigest)
Adds all uniquely identifying information to the given digest.
|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
Key
Key.hashCode()
.public int hashCode()
Key
Key.equals(Object)
.public void updateDiskCacheKey(@NonNull java.security.MessageDigest messageDigest)
Key
Note - Using MessageDigest.reset()
inside of this method will result
in undefined behavior.
updateDiskCacheKey
in interface Key