| java.lang.Object org.apache.commons.collections.keyvalue.AbstractKeyValue org.apache.commons.collections.keyvalue.AbstractMapEntry
All known Subclasses: org.apache.commons.collections.keyvalue.DefaultMapEntry,
AbstractMapEntry | abstract public class AbstractMapEntry extends AbstractKeyValue implements Map.Entry(Code) | | Abstract Pair class to assist with creating correct Map Entry implementations.
since: Commons Collections 3.0 version: $Revision: 438363 $ $Date: 2006-08-30 05:48:00 +0100 (Wed, 30 Aug 2006) $ author: James Strachan author: Michael A. Smith author: Neil O'Toole author: Stephen Colebourne |
Method Summary | |
public boolean | equals(Object obj) Compares this Map Entry with another Map Entry. | public int | hashCode() Gets a hashCode compatible with the equals method. | public Object | setValue(Object value) Sets the value stored in this Map Entry. |
AbstractMapEntry | protected AbstractMapEntry(Object key, Object value)(Code) | | Constructs a new entry with the given key and given value.
Parameters: key - the key for the entry, may be null Parameters: value - the value for the entry, may be null |
equals | public boolean equals(Object obj)(Code) | | Compares this Map Entry with another Map Entry.
Implemented per API documentation of
java.util.Map.Entry.equals(Object) Parameters: obj - the object to compare to true if equal key and value |
hashCode | public int hashCode()(Code) | | Gets a hashCode compatible with the equals method.
Implemented per API documentation of
java.util.Map.Entry.hashCode a suitable hash code |
setValue | public Object setValue(Object value)(Code) | | Sets the value stored in this Map Entry.
This Map Entry is not connected to a Map, so only the local data is changed.
Parameters: value - the new value the previous value |
|
|