Map.Entry tied to a map underneath.
This can be used to enable a map entry to make changes on the underlying map, however this will probably mess up any iterators.
| Modifier and Type | Field and Description |
|---|---|
| private final K | key
The key |
| private final Map | map
The map underlying the entry/iterator |
| private static final long | serialVersionUID
Serialization version |
| Access | Constructor and Description |
|---|---|
| public | TiedMapEntry(final Map<K, V>
the map map, final K the key key)Constructs a new entry with the given Map and key. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if equal key and valuethe object to compare to obj)Overrides java. Implements java. Map.Entry with another Map.Entry.
|
| public K | Returns: the keyImplements java. |
| public V | Returns: the valueImplements java. |
| public int | Returns: a suitable hash codeOverrides java. Implements java. |
| public V | Returns: the old valuethe new value value)Implements java. |
| public String | Returns: entry as a stringOverrides java. |
| key | back to summary |
|---|---|
| private final K key The key | |
| map | back to summary |
|---|---|
| private final Map<K, V> map The map underlying the entry/iterator | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version | |
| TiedMapEntry | back to summary |
|---|---|
| public TiedMapEntry(final Map<K, V> map, final K key) Constructs a new entry with the given Map and key.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Implements java. Compares this
Implemented per API documentation of | |
| getKey | back to summary |
|---|---|
| public K getKey() Implements java. Gets the key of this entry
| |
| getValue | back to summary |
|---|---|
| public V getValue() Implements java. Gets the value of this entry direct from the map.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Gets a hashCode compatible with the equals method.
Implemented per API documentation of
| |
| setValue | back to summary |
|---|---|
| public V setValue(final V value) Implements java. Sets the value associated with the key direct onto the map.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Gets a string version of the entry. | |