org.apache.commons.collections.keyvalue
public abstract class AbstractMapEntry extends AbstractKeyValue implements Entry
java.util.Map.Entry Map.Entry
implementations.
Since: Commons Collections 3.0
Version: $Revision: 405927 $ $Date: 2006-05-12 23:57:03 +0100 (Fri, 12 May 2006) $
Constructor Summary | |
---|---|
protected | AbstractMapEntry(Object key, Object value)
Constructs a new entry with the given key and given value.
|
Method Summary | |
---|---|
boolean | equals(Object obj)
Compares this Map.Entry with another Map.Entry .
|
int | hashCode()
Gets a hashCode compatible with the equals method.
|
Object | setValue(Object value)
Sets the value stored in this Map.Entry .
|
Parameters: key the key for the entry, may be null value the value for the entry, may be null
Map.Entry
with another Map.Entry
.
Implemented per API documentation of java.util.Map.Entry#equals(Object)
Parameters: obj the object to compare to
Returns: true if equal key and value
Implemented per API documentation of java.util.Map.Entry#hashCode()
Returns: a suitable hash code
Map.Entry
.
This Map.Entry
is not connected to a Map, so only the
local data is changed.
Parameters: value the new value
Returns: the previous value