org.apache.commons.collections.keyvalue
Class TiedMapEntry
java.lang.Object
org.apache.commons.collections.keyvalue.TiedMapEntry
- Map.Entry, KeyValue, Serializable
public class TiedMapEntry
extends java.lang.Object
implements Map.Entry, KeyValue, Serializable
A Map Entry tied to a map underneath.
This can be used to enable a map entry to make changes on the underlying
map, however this will probably mess up any iterators.
$Revision: 1.5 $ $Date: 2004/04/09 14:35:10 $TiedMapEntry(Map map, Object key) - Constructs a new entry with the given Map and key.
|
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.
|
TiedMapEntry
public TiedMapEntry(Map map,
Object key)
Constructs a new entry with the given Map and key.
map
- the mapkey
- the key
equals
public boolean equals(Object obj)
Compares this Map Entry with another Map Entry.
Implemented per API documentation of
java.util.Map.Entry.equals(Object)
obj
- the object to compare to
- true if equal key and value
getKey
public Object getKey()
Gets the key of this entry
- getKey in interface KeyValue
getValue
public Object getValue()
Gets the value of this entry direct from the map.
- getValue in interface KeyValue
hashCode
public int hashCode()
Gets a hashCode compatible with the equals method.
Implemented per API documentation of
java.util.Map.Entry.hashCode()
setValue
public Object setValue(Object value)
Sets the value associated with the key direct onto the map.
toString
public String toString()
Gets a string version of the entry.
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.