|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections.keyvalue.AbstractKeyValue<K,V>
org.apache.commons.collections.keyvalue.AbstractMapEntry<K,V>
public abstract class AbstractMapEntry<K,V>
Abstract Pair class to assist with creating correct Map Entry implementations.
Field Summary |
---|
Fields inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue |
---|
key, value |
Constructor Summary | |
---|---|
protected |
AbstractMapEntry(K key,
V value)
Constructs a new entry with the given key and given value. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compares this Map Entry with another Map Entry. |
int |
hashCode()
Gets a hashCode compatible with the equals method. |
V |
setValue(V value)
Sets the value stored in this Map Entry. |
Methods inherited from class org.apache.commons.collections.keyvalue.AbstractKeyValue |
---|
getKey, getValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map.Entry |
---|
getKey, getValue |
Constructor Detail |
---|
protected AbstractMapEntry(K key, V value)
key
- the key for the entry, may be nullvalue
- the value for the entry, may be nullMethod Detail |
---|
public V setValue(V value)
This Map Entry is not connected to a Map, so only the local data is changed.
setValue
in interface Map.Entry<K,V>
value
- the new value
public boolean equals(Object obj)
Implemented per API documentation of Map.Entry.equals(Object)
equals
in interface Map.Entry<K,V>
equals
in class Object
obj
- the object to compare to
public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()
hashCode
in interface Map.Entry<K,V>
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |