org.apache.commons.collections.keyvalue
public class TiedMapEntry extends Object implements Entry, KeyValue, Serializable
This can be used to enable a map entry to make changes on the underlying map, however this will probably mess up any iterators.
Since: Commons Collections 3.0
Version: $Revision: 1.5 $ $Date: 2004/04/09 14:35:10 $
Constructor Summary | |
---|---|
TiedMapEntry(Map map, Object key)
Constructs a new entry with the given Map and key.
|
Method Summary | |
---|---|
boolean | equals(Object obj)
Compares this Map Entry with another Map Entry.
|
Object | getKey()
Gets the key of this entry
|
Object | getValue()
Gets the value of this entry direct from the map.
|
int | hashCode()
Gets a hashCode compatible with the equals method.
|
Object | setValue(Object value)
Sets the value associated with the key direct onto the map.
|
String | toString()
Gets a string version of the entry.
|
Parameters: map the map key the key
Implemented per API documentation of {@link java.util.Map.Entry#equals(Object)}
Parameters: obj the object to compare to
Returns: true if equal key and value
Returns: the key
Returns: the value
Implemented per API documentation of {@link java.util.Map.Entry#hashCode()}
Returns: a suitable hash code
Parameters: value the new value
Returns: the old value
Throws: IllegalArgumentException if the value is set to this map entry
Returns: entry as a string