Class AbstractKeyBasedMap.EntrySet.Entry

java.lang.Object
com.tangosol.util.Base
com.tangosol.util.SimpleMapEntry<K,V>
com.tangosol.util.AbstractKeyBasedMap.EntrySet.Entry
All Implemented Interfaces:
InvocableMap.Entry<K,V>, MapTrigger.Entry<K,V>, QueryMap.Entry<K,V>, Serializable, Cloneable, Map.Entry<K,V>
Direct Known Subclasses:
ObservableSplittingBackingCache.EntrySet.Entry, OpenHashMap.EntrySet.Entry, SerializationCache.EntrySet.Entry
Enclosing class:
AbstractKeyBasedMap.EntrySet

protected class AbstractKeyBasedMap.EntrySet.Entry extends SimpleMapEntry<K,V>
A Map Entry implementation that defers its value acquisition from the containing map (via Map.get(Object)) if the Entry is constructed with a null value.
See Also:
  • Constructor Details

    • Entry

      public Entry(K oKey, V oValue)
      Construct an Entry.
      Parameters:
      oKey - the Entry key
      oValue - the Entry value (optional)
  • Method Details

    • getValue

      public V getValue()
      Returns the value corresponding to this entry.
      Specified by:
      getValue in interface InvocableMap.Entry<K,V>
      Specified by:
      getValue in interface Map.Entry<K,V>
      Overrides:
      getValue in class SimpleMapEntry<K,V>
      Returns:
      the value corresponding to this entry
    • setValue

      public V setValue(V oValue)
      Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.)
      Specified by:
      setValue in interface InvocableMap.Entry<K,V>
      Specified by:
      setValue in interface Map.Entry<K,V>
      Overrides:
      setValue in class SimpleMapEntry<K,V>
      Parameters:
      oValue - new value to be stored in this entry
      Returns:
      old value corresponding to the entry
    • hashCode

      public int hashCode()
      Returns the hash code value for this map entry. The hash code of a map entry e is defined to be:
           (e.getKey()==null   ? 0 : e.getKey().hashCode()) ^
           (e.getValue()==null ? 0 : e.getValue().hashCode())
       
      This ensures that e1.equals(e2) implies that e1.hashCode()==e2.hashCode() for any two Entries e1 and e2, as required by the general contract of Object.hashCode.
      Specified by:
      hashCode in interface Map.Entry<K,V>
      Overrides:
      hashCode in class SimpleMapEntry<K,V>
      Returns:
      the hash code value for this map entry.