Class AbstractDecoratedMap.BasicEntry<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map.Entry<K,​V>
    Direct Known Subclasses:
    LinkedMap.LinkedEntry, TimeoutMap.TimedEntry
    Enclosing class:
    AbstractDecoratedMap<K,​V>

    static class AbstractDecoratedMap.BasicEntry<K,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>, java.io.Serializable
    A simple Map.Entry implementation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) K mKey  
      (package private) V mValue  
    • Constructor Summary

      Constructors 
      Constructor Description
      BasicEntry​(K pKey, V pValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object pOther)  
      K getKey()  
      V getValue()  
      int hashCode()  
      protected void recordAccess​(java.util.Map<K,​V> pMap)
      Default implementation does nothing.
      protected void recordRemoval​(java.util.Map<K,​V> pMap)
      Default implementation does nothing.
      V setValue​(V pValue)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mKey

        K mKey
      • mValue

        V mValue
    • Constructor Detail

      • BasicEntry

        BasicEntry​(K pKey,
                   V pValue)
    • Method Detail

      • recordAccess

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

        protected void recordRemoval​(java.util.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 java.util.Map.Entry<K,​V>
      • setValue

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

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

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object