public static class CompactMap.DefaultMapEntry<K,V> extends CompactMap.MapEntry<K,V>
HashMap
.
Constructor and Description |
---|
DefaultMapEntry(K key) |
Modifier and Type | Method and Description |
---|---|
K |
getKey() |
V |
getValue() |
V |
setValue(V value) |
String |
toString() |
protected boolean |
valueEquals(Object value2)
Used by
CompactMap.MapEntry.equals(Object) to check whether the value
held by this map entry equals to the the given value. |
protected int |
valueHashCode()
Used by
CompactMap.MapEntry.hashCode() to return the real hashCode for the value
held by this map entry. |
equals, hashCode, keyHashCode, nextMapEntry
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue, copyOf
public DefaultMapEntry(K key)
public final K getKey()
public final V getValue()
protected final int valueHashCode()
CompactMap.MapEntry
CompactMap.MapEntry.hashCode()
to return the real hashCode for the value
held by this map entry.
getValue().hashCode
cannot be used in general because
getValue()
may return this
e.g. in case
the value is represented by primitive data type. The method should
use that real value for the hash code computation.valueHashCode
in class CompactMap.MapEntry<K,V>
protected final boolean valueEquals(Object value2)
CompactMap.MapEntry
CompactMap.MapEntry.equals(Object)
to check whether the value
held by this map entry equals to the the given value.
getValue().equals()
cannot be used in general because
getValue()
may return this
e.g. in case
the value is represented by primitive data type. The method should
use that real value for the operation of this method.valueEquals
in class CompactMap.MapEntry<K,V>
value2
- value to be compared with value stored in this entry.
The argument may be null.