Class ConcurrentHashMapV8.MapEntry<K,​V>

  • All Implemented Interfaces:
    java.util.Map.Entry<K,​V>
    Enclosing class:
    ConcurrentHashMapV8<K,​V>

    static final class ConcurrentHashMapV8.MapEntry<K,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>
    Exported Entry for EntryIterator
    • Method Detail

      • getKey

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

        public V getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<K,​V>
      • 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
      • equals

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

        public V setValue​(V value)
        Sets our entry's value and writes through to the map. The value to return is somewhat arbitrary here. Since we do not necessarily track asynchronous changes, the most recent "previous" value could be different from what we return (or could even have been removed, in which case the put will re-establish). We do not and cannot guarantee more.
        Specified by:
        setValue in interface java.util.Map.Entry<K,​V>