public class DefaultMapEntry extends Object implements Map.Entry, KeyValue
Map.Entry| Constructor and Description |
|---|
DefaultMapEntry()
Deprecated.
Constructs a new
DefaultMapEntry with a null key
and null value. |
DefaultMapEntry(Map.Entry entry)
Deprecated.
Constructs a new
DefaultMapEntry with the given
key and given value. |
DefaultMapEntry(Object key,
Object value)
Deprecated.
Constructs a new
DefaultMapEntry with the given
key and given value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Deprecated.
Compares this Map Entry with another Map Entry.
|
Object |
getKey()
Deprecated.
Gets the key from the Map Entry.
|
Object |
getValue()
Deprecated.
Gets the value from the Map Entry.
|
int |
hashCode()
Deprecated.
Gets a hashCode compatible with the equals method.
|
void |
setKey(Object key)
Deprecated.
Sets the key stored in this Map Entry.
|
Object |
setValue(Object value)
Deprecated.
Sets the value stored in this Map Entry.
|
String |
toString()
Deprecated.
Written to match the output of the Map.Entry's used in
a
HashMap. |
public DefaultMapEntry()
DefaultMapEntry with a null key
and null value.public DefaultMapEntry(Map.Entry entry)
DefaultMapEntry with the given
key and given value.entry - the entry to copy, must not be nullNullPointerException - if the entry is nullpublic Object getKey()
public void setKey(Object key)
This Map Entry is not connected to a Map, so only the local data is changed.
key - the new keypublic Object getValue()
public Object setValue(Object value)
This Map Entry is not connected to a Map, so only the local data is changed.
public boolean equals(Object obj)
Implemented per API documentation of Map.Entry.equals(Object)
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.