|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.SafeHashMap.Entry
protected static class SafeHashMap.Entry
A map entry (key-value pair). The Map.entrySet method returns a collection-view of the map, whose elements are of this class.
| Field Summary | |
|---|---|
protected SafeHashMap.Entry |
m_eNextThe next entry in the linked list (an open hashing implementation). |
protected int |
m_nHashThe key's hash code. |
protected java.lang.Object |
m_oKeyThe key. |
protected java.lang.Object |
m_oValueThe value. |
| Constructor Summary | |
|---|---|
protected |
SafeHashMap.Entry() |
| Method Summary | |
|---|---|
java.lang.Object |
clone()Clone the Entry. |
protected void |
copyFrom(SafeHashMap.Entry entry)Copy this Entry's information from another Entry. |
boolean |
equals(java.lang.Object o)Compares the specified object with this entry for equality. |
java.lang.Object |
getKey()Returns the key corresponding to this entry. |
java.lang.Object |
getValue()Returns the value corresponding to this entry. |
int |
hashCode()Returns the hash code value for this map entry. |
protected void |
onAdd()This method is invoked when the containing Map has actually added this Entry to itself. |
java.lang.Object |
setValue(java.lang.Object value)Replaces the value corresponding to this entry with the specified value (optional operation). |
java.lang.String |
toString()Render the map entry as a String. |
| Field Detail |
|---|
protected java.lang.Object m_oKey
protected volatile java.lang.Object m_oValue
protected int m_nHash
protected volatile SafeHashMap.Entry m_eNext
| Constructor Detail |
|---|
protected SafeHashMap.Entry()
| Method Detail |
|---|
public java.lang.Object getKey()
getKey in interface java.util.Map.Entrypublic java.lang.Object getValue()
getValue in interface java.util.Map.Entrypublic java.lang.Object setValue(java.lang.Object value)
setValue in interface java.util.Map.Entryvalue - new value to be stored in this entrypublic boolean equals(java.lang.Object o)
(e1.getKey()==null ?
e2.getKey()==null : e1.getKey().equals(e2.getKey())) &&
(e1.getValue()==null ?
e2.getValue()==null : e1.getValue().equals(e2.getValue()))
This ensures that the equals method works properly across different implementations of the Map.Entry interface.equals in interface java.util.Map.Entryo - object to be compared for equality with this map entrypublic int hashCode()
(e.getKey()==null ? 0 : e.getKey().hashCode()) ^
(e.getValue()==null ? 0 : 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 interface java.util.Map.Entrypublic java.lang.String toString()
public java.lang.Object clone()
copyFrom.protected void copyFrom(SafeHashMap.Entry entry)
entry - the entry to copy fromprotected void onAdd()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||