|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Map.entrySet()
Method Summary | |
boolean | equals(Object o)
Compares the specified Object with this Entry for equality. |
Object | getKey()
Returns the key corresponding to this Entry. |
Object | getValue()
Returns the value corresponding to this Entry. |
int | hashCode()
Returns the hash code value for this Map. |
Object | setValue(Object value)
Replaces the value corresponding to this Entry with the specified value (optional operation). |
Method Detail |
public Object getKey()
public Object getValue()
public Object setValue(Object value)
New
- value to be stored in this Entry.public boolean equals(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.Object.hashCode()
,
Object.equals(Object)
,
equals(Object)
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |