Top Description Methods
javax.cache.annotation

public Interface GeneratedCacheKey

extends Serializable
Imports
java.io.Serializable

A Serializable, immutable, thread-safe object that is used as a key, automatically generated by a CacheKeyGenerator.

The implementation MUST follow the Java contract for Object#hashCode() and Object#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.

Author
Eric Dalquist
Since
1.0
See Also
CacheKeyGenerator

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the objects are equal
equals
(Object
The other object to compare to.
object
)

Compare this GeneratedCacheKey with another.

public int

Returns:

The hash code of the object
hashCode
()

The immutable hash code of the cache key.

Method Detail

equalsback to summary
public boolean equals(Object object)

Compare this GeneratedCacheKey with another. If the two objects are equal their hashCode() values MUST be equal as well.

Parameters
object:Object

The other object to compare to.

Returns:boolean

true if the objects are equal

Annotations
@Override
See Also
Object#equals(Object)
hashCodeback to summary
public int hashCode()

The immutable hash code of the cache key.

Returns:int

The hash code of the object

Annotations
@Override
See Also
Object#hashCode()