java.lang.Object | |
↳ | org.apache.commons.collections.DefaultMapEntry |
This class is deprecated.
Use the version in the keyvalue subpackage. Will be removed in v4.0
A default implementation of java.util.Map.Entry
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
DefaultMapEntry with a null key
and null value. | |||||||||||
Constructs a new
DefaultMapEntry with the given
key and given value. | |||||||||||
Constructs a new
DefaultMapEntry with the given
key and given value. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares this Map Entry with another Map Entry.
| |||||||||||
Gets the key from the Map Entry.
| |||||||||||
Gets the value from the Map Entry.
| |||||||||||
Gets a hashCode compatible with the equals method.
| |||||||||||
Sets the key stored in this Map Entry.
| |||||||||||
Sets the value stored in this Map Entry.
| |||||||||||
Written to match the output of the Map.Entry's used in
a
HashMap . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.util.Map.Entry
| |||||||||||
From interface
org.apache.commons.collections.KeyValue
|
Constructs a new DefaultMapEntry
with a null key
and null value.
Constructs a new DefaultMapEntry
with the given
key and given value.
entry | the entry to copy, must not be null |
---|
NullPointerException | if the entry is null |
---|
Constructs a new DefaultMapEntry
with the given
key and given value.
key | the key for the entry, may be null |
---|---|
value | the value for the entry, may be null |
Compares this Map Entry with another Map Entry.
Implemented per API documentation of equals(Object)
obj | the object to compare to |
---|
Gets a hashCode compatible with the equals method.
Implemented per API documentation of hashCode()
Sets the key stored in this Map Entry.
This Map Entry is not connected to a Map, so only the local data is changed.
key | the new key |
---|
Sets the value stored in this Map Entry.
This Map Entry is not connected to a Map, so only the local data is changed.
value | the new value |
---|