Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
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. |
java.lang.Object | setValue(java.lang.Object value)
Replaces the value corresponding to this Entry with the specified value (optional operation). |
Method Detail |
public java.lang.Object getKey()
public java.lang.Object getValue()
public java.lang.Object setValue(java.lang.Object value)
New
- value to be stored in this Entry.public boolean equals(java.lang.Object o)
e1
and e2
represent
the same mapping if (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.
o
- Object to be compared for equality with this Map.Entry.public int hashCode()
e
is defined to be:
(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.Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |