K
- The type of key stored by the entry.V
- The type of value stored by the entry.public static class Maps.SoftLinkedEntry<K,V> extends java.lang.ref.SoftReference<V> implements Maps.LinkedEntry<K,V>
Maps.LinkedEntry
implementation which holds its value with a SoftReference
.
Because the referent of a soft reference cannot be changed, the setValue(V)
method throws UnsupportedOperationException
if invoked.
Maps.SoftLinkedHashMap
Modifier | Constructor and Description |
---|---|
protected |
Maps.SoftLinkedEntry(int hash, K key, V value, Maps.LinkedEntry<K,V> next, java.lang.ref.ReferenceQueue<V> queue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
Maps.LinkedEntry<K,V> |
getAfter()
Gets the next entry in the iteration list of the containing map.
|
Maps.LinkedEntry<K,V> |
getBefore()
Gets the previous entry in the iteration list of the containing map.
|
K |
getKey() |
Maps.BaseEntry<K,V> |
getNext()
Gets the next entry in the containing hash chain of the containing map.
|
V |
getValue() |
int |
hashCode() |
boolean |
isMutable()
Gets whether this entry is mutable, in particular whether
Map.Entry.setValue(V) is supported. |
int |
keyHashCode()
Gets the hash code of the key in this entry.
|
void |
setAfter(Maps.LinkedEntry<K,V> after)
Sets the next entry in the iteration list of the containing map.
|
void |
setBefore(Maps.LinkedEntry<K,V> before)
Sets the previous entry in the iteration list of the containing map.
|
void |
setNext(Maps.BaseEntry<K,V> next)
Sets the next entry in the containing hash chain of the containing map.
|
V |
setValue(V newValue) |
java.lang.String |
toString() |
public Maps.BaseEntry<K,V> getNext()
Maps.BaseEntry
getNext
in interface Maps.BaseEntry<K,V>
public void setNext(Maps.BaseEntry<K,V> next)
Maps.BaseEntry
setNext
in interface Maps.BaseEntry<K,V>
public int keyHashCode()
Maps.BaseEntry
keyHashCode
in interface Maps.BaseEntry<K,V>
public boolean isMutable()
Maps.BaseEntry
Map.Entry.setValue(V)
is supported.isMutable
in interface Maps.BaseEntry<K,V>
public final Maps.LinkedEntry<K,V> getBefore()
Maps.LinkedEntry
getBefore
in interface Maps.LinkedEntry<K,V>
public final Maps.LinkedEntry<K,V> getAfter()
Maps.LinkedEntry
getAfter
in interface Maps.LinkedEntry<K,V>
public final void setBefore(Maps.LinkedEntry<K,V> before)
Maps.LinkedEntry
setBefore
in interface Maps.LinkedEntry<K,V>
public final void setAfter(Maps.LinkedEntry<K,V> after)
Maps.LinkedEntry
setAfter
in interface Maps.LinkedEntry<K,V>
public boolean equals(java.lang.Object object)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object