Class RemovalNotification<K,V>

  • All Implemented Interfaces:
    Map.Entry<K,V>


    @Beta
     @GwtCompatible
    public final class RemovalNotification<K,V>
    extends Object
    implements Map.Entry<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.

    Since:
    10.0
    • Method Detail

      • getCause

        public RemovalCause getCause()
        Returns the cause for which the entry was removed.
      • getKey

        public K getKey()
      • getValue

        public V getValue()
      • setValue

        public final V setValue(V value)
      • equals

        public boolean equals(Object object)
      • hashCode

        public int hashCode()
      • toString

        public String toString()
        Returns a string representation of the form {key}={value}.