protected static class AbstractHashedMap.HashEntry extends java.lang.Object implements java.util.Map.Entry, KeyValue
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 |
next
The next entry in the hash chain
|
protected java.lang.Object |
value
The value
|
Modifier | Constructor and Description |
---|---|
protected |
HashEntry(AbstractHashedMap.HashEntry next,
int hashCode,
java.lang.Object key,
java.lang.Object value)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getKey()
Gets the key from the pair.
|
java.lang.Object |
getValue()
Gets the value from the pair.
|
int |
hashCode() |
java.lang.Object |
setValue(java.lang.Object value) |
java.lang.String |
toString() |
protected AbstractHashedMap.HashEntry next
protected int hashCode
protected java.lang.Object key
protected java.lang.Object value
protected HashEntry(AbstractHashedMap.HashEntry next, int hashCode, java.lang.Object key, java.lang.Object value)
next
- the nexthashCode
- the hash codekey
- the keyvalue
- the valuepublic java.lang.Object getKey()
KeyValue
public java.lang.Object getValue()
KeyValue
public java.lang.Object setValue(java.lang.Object value)
setValue
in interface java.util.Map.Entry
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Map.Entry
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Map.Entry
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object