Class AbstractDecoratedMap.BasicEntry<K,V>

java.lang.Object
com.twelvemonkeys.util.AbstractDecoratedMap.BasicEntry<K,V>
All Implemented Interfaces:
Serializable, Map.Entry<K,V>
Direct Known Subclasses:
LinkedMap.LinkedEntry, TimeoutMap.TimedEntry
Enclosing class:
AbstractDecoratedMap<K,V>

static class AbstractDecoratedMap.BasicEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
A simple Map.Entry implementation.
  • Field Details

    • mKey

      K mKey
    • mValue

      V mValue
  • Constructor Details

    • BasicEntry

      BasicEntry(K pKey, V pValue)
  • Method Details

    • recordAccess

      protected void recordAccess(Map<K,V> pMap)
      Default implementation does nothing.
      Parameters:
      pMap - the map that is accessed
    • recordRemoval

      protected void recordRemoval(Map<K,V> pMap)
      Default implementation does nothing.
      Parameters:
      pMap - the map that is removed from
    • getValue

      public V getValue()
      Specified by:
      getValue in interface Map.Entry<K,V>
    • setValue

      public V setValue(V pValue)
      Specified by:
      setValue in interface Map.Entry<K,V>
    • getKey

      public K getKey()
      Specified by:
      getKey in interface Map.Entry<K,V>
    • equals

      public boolean equals(Object pOther)
      Specified by:
      equals in interface Map.Entry<K,V>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map.Entry<K,V>
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object