public class DefaultMapEntry extends Object implements Map.Entry
Map.Entry| Constructor and Description |
|---|
DefaultMapEntry()
Constructs a new
DefaultMapEntry with a null key and null value. |
DefaultMapEntry(Object key,
Object value)
Constructs a new
DefaultMapEntry with the given key and given value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Implemented per API documentation of
Map.Entry.equals(Object) |
Object |
getKey()
Returns the key.
|
Object |
getValue()
Returns the value.
|
int |
hashCode()
Implemented per API documentation of
Map.Entry.hashCode() |
void |
setKey(Object key)
Sets the key.
|
Object |
setValue(Object value)
Note that this method only sets the local reference inside this object and does not modify the original Map.
|
public DefaultMapEntry()
DefaultMapEntry with a null key and null value.public boolean equals(Object o)
Map.Entry.equals(Object)public int hashCode()
Map.Entry.hashCode()public Object getKey()
public Object getValue()
public void setKey(Object key)
key - the new key