private static class ReferenceIdentityMap.ReferenceEntry
extends java.lang.ref.WeakReference
If getKey() or getValue() returns null, it means the mapping is stale and should be removed.
| Modifier and Type | Field and Description |
|---|---|
private int |
hashCode
The hash code of the key
|
private ReferenceIdentityMap.ReferenceEntry |
next
The next entry in the hash chain
|
private java.lang.Object |
value
The value
|
| Modifier | Constructor and Description |
|---|---|
private |
ReferenceEntry(ReferenceIdentityMap parent,
ReferenceIdentityMap.ReferenceEntry next,
int hashCode,
java.lang.Object key,
java.lang.Object value)
Creates a new entry object for the ReferenceMap.
|
| Modifier and Type | Method and Description |
|---|---|
private java.lang.Object |
getKey()
Gets the key from the entry.
|
private java.lang.Object |
getValue()
Gets the value from the entry.
|
private void |
purged()
Purges this entry.
|
private java.lang.Object |
setValue(java.lang.Object obj)
Sets the value of the entry.
|
private ReferenceIdentityMap.ReferenceEntry next
private int hashCode
private java.lang.Object value
private ReferenceEntry(ReferenceIdentityMap parent, ReferenceIdentityMap.ReferenceEntry next, int hashCode, java.lang.Object key, java.lang.Object value)
parent - the parent mapnext - the next entry in the hash buckethashCode - the hash code of the keykey - the keyvalue - the valueprivate java.lang.Object getKey()
private java.lang.Object getValue()
private java.lang.Object setValue(java.lang.Object obj)
obj - the object to storeprivate void purged()