Package org.apache.groovy.util.concurrent

# Class ConcurrentReferenceHashMap.SimpleEntry<K,V>

java.lang.Object
org.apache.groovy.util.concurrent.ConcurrentReferenceHashMap.SimpleEntry<K,V>

All Implemented Interfaces:
  `Serializable`, `Map.Entry<K,V>`

Direct Known Subclasses:
  `ConcurrentReferenceHashMap.WriteThroughEntry`

Enclosing class:
  ConcurrentReferenceHashMap<K,V>

protected static class ConcurrentReferenceHashMap.SimpleEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
Simple mutable entry implementation used by the map views.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final K`
  `key`
  Entry key.
  `protected V`
  `value`
  Entry value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleEntry(Map.Entry<? extends K,? extends V> entry)`
  Creates an entry by copying another entry.
  `SimpleEntry(K key, V value)`
  Creates an entry with the supplied key and value.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `K`
  `getKey()`
  `V`
  `getValue()`
  `int`
  `hashCode()`
  `V`
  `setValue(V value)`
  `String`
  `toString()`

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

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

- ## Field Details

  - ### key

    protected final K key
    Entry key.

  - ### value

    protected V value
    Entry value.

- ## Constructor Details

  - ### SimpleEntry

    public SimpleEntry(K key, V value)
    Creates an entry with the supplied key and value.
    Parameters:
      `key` - the entry key
      `value` - the entry value

  - ### SimpleEntry

    public SimpleEntry(Map.Entry<? extends K,? extends V> entry)
    Creates an entry by copying another entry.
    Parameters:
      `entry` - the entry to copy

- ## Method Details

  - ### getKey

    public K getKey()
    Specified by:
      `getKey` in interface `Map.Entry<K,V>`

  - ### getValue

    public V getValue()
    Specified by:
      `getValue` in interface `Map.Entry<K,V>`

  - ### setValue

    public V setValue(V value)
    Specified by:
      `setValue` in interface `Map.Entry<K,V>`

  - ### equals

    public boolean equals(Object o)
    Specified by:
      `equals` in interface `Map.Entry<K,V>`
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `Map.Entry<K,V>`
    Overrides:
      `hashCode` in class `Object`

  - ### toString

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