static final class MapMaker.RemovalNotification<K,V> extends ImmutableEntry<K,V>
Like other Map.Entry instances associated with MapMaker, this class holds strong
references to the key and value, regardless of the type of references the map may be using.
| Modifier and Type | Field and Description |
|---|---|
private MapMaker.RemovalCause |
cause |
private static long |
serialVersionUID |
key, value| Constructor and Description |
|---|
RemovalNotification(K key,
V value,
MapMaker.RemovalCause cause) |
| Modifier and Type | Method and Description |
|---|---|
MapMaker.RemovalCause |
getCause()
Returns the cause for which the entry was removed.
|
boolean |
wasEvicted()
Returns
true if there was an automatic removal due to eviction (the cause is neither
MapMaker.RemovalCause.EXPLICIT nor MapMaker.RemovalCause.REPLACED). |
getKey, getValue, setValueequals, hashCode, toStringprivate static final long serialVersionUID
private final MapMaker.RemovalCause cause
RemovalNotification(@Nullable
K key,
@Nullable
V value,
MapMaker.RemovalCause cause)
public MapMaker.RemovalCause getCause()
public boolean wasEvicted()
true if there was an automatic removal due to eviction (the cause is neither
MapMaker.RemovalCause.EXPLICIT nor MapMaker.RemovalCause.REPLACED).