Package javax.cache.annotation
Interface GeneratedCacheKey
-
- All Superinterfaces:
java.io.Serializable
public interface GeneratedCacheKey extends java.io.SerializableASerializable, immutable, thread-safe object that is used as a key, automatically generated by aCacheKeyGenerator.The implementation MUST follow the Java contract for
Object.hashCode()andObject.equals(Object)to ensure correct behavior.It is recommended that implementations also override
Object.toString()and provide a human-readable string representation of the key.- Since:
- 1.0
- See Also:
CacheKeyGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object object)Compare thisGeneratedCacheKeywith another.inthashCode()The immutable hash code of the cache key.
-
-
-
Method Detail
-
hashCode
int hashCode()
The immutable hash code of the cache key.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code of the object
- See Also:
Object.hashCode()
-
equals
boolean equals(java.lang.Object object)
Compare thisGeneratedCacheKeywith another. If the two objects are equal theirhashCode()values MUST be equal as well.- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The other object to compare to.- Returns:
- true if the objects are equal
- See Also:
Object.equals(Object)
-
-