|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Cache.Entry<K,V>
A cache entry (key-value pair).
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Compares the specified object with this entry for equality. |
K |
getKey()
Returns the key corresponding to this entry. |
V |
getValue()
Returns the value stored in the cache when this entry was created. |
int |
hashCode()
Returns the hash code value for this cache entry. |
| Method Detail |
|---|
K getKey()
V getValue()
boolean equals(Object o)
e1.getKey().equals(e2.getKey()) &&
e1.getValue().equals(e2.getValue())
This ensures that the equals method works properly across
different implementations of the Cache.Entry interface.
equals in class Objecto - object to be compared for equality with this cache entry
int hashCode()
e.getKey().hashCode() ^
e.getValue().hashCode()
This ensures that e1.equals(e2) implies that
e1.hashCode()==e2.hashCode() for any two Entries
e1 and e2, as required by the general
contract of Object.hashCode.
hashCode in class ObjectObject.hashCode(),
Object.equals(Object),
equals(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||