| java.lang.Object org.apache.commons.collections.DefaultMapEntry
DefaultMapEntry | public class DefaultMapEntry implements Map.Entry,KeyValue(Code) | | A default implementation of
java.util.Map.Entry since: Commons Collections 1.0 version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $ author: James Strachan author: Michael A. Smith author: Neil O'Toole author: Stephen Colebourne |
Constructor Summary | |
public | DefaultMapEntry() Constructs a new DefaultMapEntry with a null key
and null value. | public | DefaultMapEntry(Map.Entry entry) Constructs a new DefaultMapEntry with the given
key and given value. | public | DefaultMapEntry(Object key, Object value) Constructs a new DefaultMapEntry with the given
key and given value. |
DefaultMapEntry | public DefaultMapEntry()(Code) | | Constructs a new DefaultMapEntry with a null key
and null value.
|
DefaultMapEntry | public DefaultMapEntry(Map.Entry entry)(Code) | | Constructs a new DefaultMapEntry with the given
key and given value.
Parameters: entry - the entry to copy, must not be null throws: NullPointerException - if the entry is null |
DefaultMapEntry | public DefaultMapEntry(Object key, Object value)(Code) | | Constructs a new DefaultMapEntry 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 |
getKey | public Object getKey()(Code) | | Gets the key from the Map Entry.
the key |
getValue | public Object getValue()(Code) | | Gets the value from the Map Entry.
the 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 |
setKey | public void setKey(Object key)(Code) | | Sets the key stored in this Map Entry.
This Map Entry is not connected to a Map, so only the local data is changed.
Parameters: key - the new key |
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 |
|
|