Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
Method Summary | |
boolean | equals(Object o)
|
Object | getKey()
|
Object | getValue()
|
int | hashCode()
|
Object | setValue(Object value)
|
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.Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |