K - the type of keys maintained by this mapV - the type of mapped valuesprotected static class AbstractHashMap.HashEntry<K,V> extends Object implements 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 K |
key
The key
|
protected AbstractHashMap.HashEntry<K,V> |
next
The next entry in the hash chain
|
protected V |
value
The value
|
| Modifier | Constructor and Description |
|---|---|
protected |
HashEntry(AbstractHashMap.HashEntry<K,V> next,
int hashCode,
K key,
V value)
Constructs new
AbstractHashMap.HashEntry. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
K |
getKey()
Gets the key from the pair.
|
V |
getValue()
Gets the value from the pair.
|
int |
hashCode() |
V |
setValue(V value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValueprotected AbstractHashMap.HashEntry<K,V> next
protected int hashCode
protected K key
protected V value
protected HashEntry(AbstractHashMap.HashEntry<K,V> next, int hashCode, K key, V value)
AbstractHashMap.HashEntry.next - the next entry in sequencehashCode - the hash code to usekey - the key to storevalue - the value to storeCopyright © 2020. All rights reserved.