Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class ConcurrentReaderHashMap.Entry

- org.codehaus.groovy.runtime.metaclass.ConcurrentReaderHashMap.Entry

- All Implemented Interfaces and Traits:
    MapEntry

      protected static class ConcurrentReaderHashMap.Entry
      extends Object
      implements MapEntry

  ConcurrentReaderHashMap collision list entry.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected int` | `hash` |
    `protected Object` | `key` |
    `protected ConcurrentReaderHashMap.Entry` | `next` |
    `protected Object` | `value` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `equals(Object o)` Compares the specified object with this entry for equality.
    `` | `public Object` | `getKey()` Returns the key of this entry.
    `` | `public Object` | `getValue()` Get the value.
    `` | `public int` | `hashCode()` Returns the hash code for this entry.
    `` | `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.
    `` | `public String` | `toString()` Returns a string representation of this entry.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected final int hash

    - #### protected final Object key

    - #### protected final ConcurrentReaderHashMap.Entry next

    - #### protected Object value

  - ### Method Detail

    - #### public boolean equals(Object o)

      Compares the specified object with this entry for equality. Returns true if the given object is also a Map.Entry and has the same key and value.

      Parameters:
        `o` - the object to compare
      Returns:
        true if equal, false otherwise

    - #### public Object getKey()

      Returns the key of this entry.

      Returns:
        the key

    - #### 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.

      Returns:
        the current value, or null if the entry has been detectably removed.

    - #### public int hashCode()

      Returns the hash code for this entry. Computed as the XOR of the hash codes of the key and value.

      Returns:
        the hash code

    - #### 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.)

      Parameters:
        `value` - the new value.
      Returns:
        the previous value, or null if entry has been detectably removed.
      Throws:
        NullPointerException if the value is `null`.

    - #### public String toString()

      Returns a string representation of this entry.

      Returns:
        a string representation in the form "key=value"