Class AbstractMapEntry<K,V>
java.lang.Object
org.apache.openjpa.lib.util.collections.AbstractKeyValue<K,V>
org.apache.openjpa.lib.util.collections.AbstractMapEntry<K,V>
- Type Parameters:
K
- the type of keysV
- the type of mapped values
- Direct Known Subclasses:
DefaultMapEntry
,UnmodifiableMapEntry
Abstract Pair class to assist with creating correct
Map.Entry
implementations.- Since:
- 3.0
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractMapEntry
(K key, V value) Constructs a new entry with the given key and given value. -
Method Summary
Methods inherited from class org.apache.openjpa.lib.util.collections.AbstractKeyValue
getKey, getValue, setKey, toString
-
Constructor Details
-
AbstractMapEntry
Constructs a new entry with the given key and given value.- Parameters:
key
- the key for the entry, may be nullvalue
- the value for the entry, may be null
-
-
Method Details
-
setValue
Sets the value stored in thisMap.Entry
.This
Map.Entry
is not connected to a Map, so only the local data is changed. -
equals
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()
-