public class DefaultMapEntry extends java.lang.Object implements java.util.Map.Entry, KeyValue
Map.Entry| Constructor and Description |
|---|
DefaultMapEntry()
Deprecated.
Constructs a new
DefaultMapEntry with a null key
and null value. |
DefaultMapEntry(java.util.Map.Entry entry)
Deprecated.
Constructs a new
DefaultMapEntry with the given
key and given value. |
DefaultMapEntry(java.lang.Object key,
java.lang.Object value)
Deprecated.
Constructs a new
DefaultMapEntry with the given
key and given value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Deprecated.
Compares this Map Entry with another Map Entry.
|
java.lang.Object |
getKey()
Deprecated.
Gets the key from the Map Entry.
|
java.lang.Object |
getValue()
Deprecated.
Gets the value from the Map Entry.
|
int |
hashCode()
Deprecated.
Gets a hashCode compatible with the equals method.
|
void |
setKey(java.lang.Object key)
Deprecated.
Sets the key stored in this Map Entry.
|
java.lang.Object |
setValue(java.lang.Object value)
Deprecated.
Sets the value stored in this Map Entry.
|
java.lang.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(java.util.Map.Entry entry)
DefaultMapEntry with the given
key and given value.entry - the entry to copy, must not be nulljava.lang.NullPointerException - if the entry is nullpublic DefaultMapEntry(java.lang.Object key,
java.lang.Object value)
DefaultMapEntry with the given
key and given value.key - the key for the entry, may be nullvalue - the value for the entry, may be nullpublic java.lang.Object getKey()
public void setKey(java.lang.Object key)
This Map Entry is not connected to a Map, so only the local data is changed.
key - the new keypublic java.lang.Object getValue()
public java.lang.Object setValue(java.lang.Object value)
This Map Entry is not connected to a Map, so only the local data is changed.
setValue in interface java.util.Map.Entryvalue - the new valuepublic boolean equals(java.lang.Object obj)
Implemented per API documentation of Map.Entry.equals(Object)
equals in interface java.util.Map.Entryequals in class java.lang.Objectobj - the object to compare topublic int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode in interface java.util.Map.EntryhashCode in class java.lang.Objectpublic java.lang.String toString()
HashMap.toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved