|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(Object object)
|
RemovalCause |
getCause()
Returns the cause for which the entry was removed. |
K |
getKey()
|
V |
getValue()
|
int |
hashCode()
|
V |
setValue(V value)
|
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 Map.Entry<K,V>
@Nullable public V getValue()
getValue
in interface Map.Entry<K,V>
public final V setValue(V value)
setValue
in interface Map.Entry<K,V>
public boolean equals(@Nullable Object object)
equals
in interface Map.Entry<K,V>
equals
in class Object
public int hashCode()
hashCode
in interface Map.Entry<K,V>
hashCode
in class Object
public String toString()
{key}={value}
.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |