Package: org.apache.groovy.util.concurrent

## [Java] Class ConcurrentReferenceHashMap.WriteThroughEntry

- org.apache.groovy.util.concurrent.ConcurrentReferenceHashMap.WriteThroughEntry

-     protected class ConcurrentReferenceHashMap.WriteThroughEntry
      extends ConcurrentReferenceHashMap.SimpleEntry

  Custom Entry class used by EntryIterator.next(), that relays setValue changes to the underlying map.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class ConcurrentReferenceHashMap.SimpleEntry` | `key, value`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `protected WriteThroughEntry(K k, V v)` Creates a write-through entry backed by the supplied key and value.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public V` | `setValue(V value)` Set our entry's value and writes it through to the map.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ConcurrentReferenceHashMap.SimpleEntry` | `equals, getKey, getValue, hashCode, setValue, toString`

- - ### Constructor Detail

    - #### protected WriteThroughEntry(K k, V v)

      Creates a write-through entry backed by the supplied key and value.

      Parameters:
        `k` - the entry key
        `v` - the entry value

  - ### Method Detail

    - #### public V setValue(V value)

      Set our entry's value and writes it through to the map. The value to return is somewhat arbitrary: since a WriteThroughEntry does 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.