|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.common.cache.RemovalNotification<K,V>
@Beta public final class RemovalNotification<K,V>
A notification of the removal of a single entry. The key and/or value may be null if they were already garbage collected.
Like other Map.Entry instances associated with CacheBuilder, this class holds
strong references to the key and value, regardless of the type of references the cache may be
using.
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
|
RemovalCause |
getCause()
Returns the cause for which the entry was removed. |
K |
getKey()
|
V |
getValue()
|
int |
hashCode()
|
V |
setValue(V value)
|
java.lang.String |
toString()
Returns a string representation of the form {key}={value}. |
boolean |
wasEvicted()
Returns true if there was an automatic removal due to eviction (the cause is neither
RemovalCause.EXPLICIT nor RemovalCause.REPLACED). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public RemovalCause getCause()
public boolean wasEvicted()
true if there was an automatic removal due to eviction (the cause is neither
RemovalCause.EXPLICIT nor RemovalCause.REPLACED).
@Nullable public K getKey()
getKey in interface java.util.Map.Entry<K,V>@Nullable public V getValue()
getValue in interface java.util.Map.Entry<K,V>public final V setValue(V value)
setValue in interface java.util.Map.Entry<K,V>
public boolean equals(@Nullable
java.lang.Object object)
equals in interface java.util.Map.Entry<K,V>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Map.Entry<K,V>hashCode in class java.lang.Objectpublic java.lang.String toString()
{key}={value}.
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||