ConcurrentReaderHashMap.Entry (Groovy 5.0.8)
Description: declaration: package: org.codehaus.groovy.runtime.metaclass, class: ConcurrentReaderHashMap, class: Entry

Package org.codehaus.groovy.runtime.metaclass

# Class ConcurrentReaderHashMap.Entry

java.lang.Object
org.codehaus.groovy.runtime.metaclass.ConcurrentReaderHashMap.Entry

All Implemented Interfaces:
  `Map.Entry`

Enclosing class:
  ConcurrentReaderHashMap

protected static class ConcurrentReaderHashMap.Entry extends Object implements Map.Entry
ConcurrentReaderHashMap collision list entry.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final int`
  `hash`
  `protected final Object`
  `key`
  `protected final ConcurrentReaderHashMap.Entry`
  `next`
  `protected Object`
  `value`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `Object`
  `getKey()`
  `Object`
  `getValue()`
  Get the value.
  `int`
  `hashCode()`
  `Object`
  `setValue(Object value)`
  Set the value of this entry (Note: In an entrySet or entrySet.iterator), unless the set or iterator is used under synchronization of the table as a whole (or you can otherwise guarantee lack of concurrent modification), `setValue` is not strictly guaranteed to actually replace the value field obtained via the `get` operation of the underlying hash table in multithreaded applications.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### hash

    protected final int hash

  - ### key

    protected final Object key

  - ### next

    protected final ConcurrentReaderHashMap.Entry next

  - ### value

    protected volatile Object value

- ## Method Details

  - ### getKey

    public Object getKey()
    Specified by:
      `getKey` in interface `Map.Entry`

  - ### getValue

    public Object getValue()
    Get the value. Note: In an entrySet or entrySet.iterator, unless the set or iterator is used under synchronization of the table as a whole (or you can otherwise guarantee lack of concurrent modification), `getValue` might return null, reflecting the fact that the entry has been concurrently removed. However, there are no assurances that concurrent removals will be reflected using this method.
    Specified by:
      `getValue` in interface `Map.Entry`
    Returns:
      the current value, or null if the entry has been detectably removed.

  - ### setValue

    public Object setValue(Object value)
    Set the value of this entry (Note: In an entrySet or entrySet.iterator), unless the set or iterator is used under synchronization of the table as a whole (or you can otherwise guarantee lack of concurrent modification), `setValue` is not strictly guaranteed to actually replace the value field obtained via the `get` operation of the underlying hash table in multithreaded applications. If iterator-wide synchronization is not used, and any other concurrent `put` or `remove` operations occur, sometimes even to other entries, then this change is not guaranteed to be reflected in the hash table. (It might, or it might not. There are no assurances either way.)
    Specified by:
      `setValue` in interface `Map.Entry`
    Parameters:
      `value` - the new value.
    Returns:
      the previous value, or null if entry has been detectably removed.
    Throws:
      `NullPointerException` - if the value is `null`.

  - ### equals

    public boolean equals(Object o)
    Specified by:
      `equals` in interface `Map.Entry`
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `Map.Entry`
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`