Class AbstractMapEntry
- java.lang.Object
-
- org.apache.commons.collections.keyvalue.AbstractKeyValue
-
- org.apache.commons.collections.keyvalue.AbstractMapEntry
-
- Direct Known Subclasses:
BeanMap.MyMapEntry
,DefaultMapEntry
,UnmodifiableMapEntry
public abstract class AbstractMapEntry extends AbstractKeyValue implements Map.Entry
Abstract Pair class to assist with creating correctMap.Entry
implementations.- Since:
- Commons Collections 3.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- James Strachan, Michael A. Smith, Neil O'Toole, Stephen Colebourne
-
-
Field Summary
-
Fields inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue
key, value
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMapEntry(Object key, Object value)
Constructs a new entry with the given key and given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Compares thisMap.Entry
with anotherMap.Entry
.int
hashCode()
Gets a hashCode compatible with the equals method.Object
setValue(Object value)
Sets the value stored in thisMap.Entry
.-
Methods inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue
getKey, getValue, toString
-
-
-
-
Method Detail
-
setValue
public Object setValue(Object value)
Sets the value stored in thisMap.Entry
.This
Map.Entry
is not connected to a Map, so only the local data is changed.
-
equals
public boolean equals(Object obj)
Compares thisMap.Entry
with anotherMap.Entry
.Implemented per API documentation of
Map.Entry.equals(Object)
-
hashCode
public int hashCode()
Gets a hashCode compatible with the equals method.Implemented per API documentation of
Map.Entry.hashCode()
-
-