protected static class AbstractHashedMap.HashEntry<K,V> extends java.lang.Object implements java.util.Map.Entry<K,V>, KeyValue<K,V>
If you subclass AbstractHashedMap
but not HashEntry
then you will not be able to access the protected fields.
The entryXxx()
methods on AbstractHashedMap
exist
to provide the necessary access.
Modifier and Type | Field and Description |
---|---|
protected int |
hashCode
The hash code of the key
|
protected java.lang.Object |
key
The key
|
protected AbstractHashedMap.HashEntry<K,V> |
next
The next entry in the hash chain
|
protected java.lang.Object |
value
The value
|
Modifier | Constructor and Description |
---|---|
protected |
HashEntry(AbstractHashedMap.HashEntry<K,V> next,
int hashCode,
java.lang.Object key,
V value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
K |
getKey()
Gets the key from the pair.
|
V |
getValue()
Gets the value from the pair.
|
int |
hashCode() |
V |
setValue(V value) |
java.lang.String |
toString() |
protected AbstractHashedMap.HashEntry<K,V> next
protected int hashCode
protected java.lang.Object key
protected java.lang.Object value
protected HashEntry(AbstractHashedMap.HashEntry<K,V> next, int hashCode, java.lang.Object key, V value)
public V getValue()
KeyValue
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object