If a key exists within the two merged maps, then the retained value is the one of the right map.
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | UnmodifiableMergingMapView.
the type of the set elements. T>Abstract implements of a set that is failing as soon as possible when modifiers are called. |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | UnmodifiableMergingMapView(Map<? extends K, ? extends V>
the left operand to merge. left, Map<? extends K, ? extends V> the right operand to merge. right)Construct the wrapping map. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides java. Implements java. Removes all of the mappings from this map (optional operation). |
| private static <K, V> Set | |
| public Set | entrySet()
Implements abstract java. Implements java. Returns a |
| public V | put(K key, V value)
Overrides java. Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public V | remove(Object key)
Overrides java. Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public void | replaceAll(BiFunction<? super K, ? super V, ? extends V> function)
Overrides default java. Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception (optional operation). |
| left | back to summary |
|---|---|
| private final Map<? extends K, ? extends V> left | |
| right | back to summary |
|---|---|
| private final Map<? extends K, ? extends V> right | |
| UnmodifiableMergingMapView | back to summary |
|---|---|
| public UnmodifiableMergingMapView(Map<? extends K, ? extends V> left, Map<? extends K, ? extends V> right) Construct the wrapping map. | |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.
| |
| difference | back to summary |
|---|---|
| private static <K, V> Set | |
| entrySet | back to summary |
|---|---|
| public Set Implements abstract java. Implements java. Doc from java. Returns a
| |
| put | back to summary |
|---|---|
| public V put(K key, V value) Overrides java. Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| remove | back to summary |
|---|---|
| public V remove(Object key) Overrides java. Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns.
| |
| replaceAll | back to summary |
|---|---|
| public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) Overrides default java. Doc from java. Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception (optional operation). Exceptions thrown by the function are relayed to the caller.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(T entry)
Overrides java. Implements java. Adds the specified element to this set if it is not already present (optional operation). |
| public void | clear()
Overrides java. Implements java. Removes all of the elements from this set (optional operation). |
| public boolean | remove(Object element)
Overrides java. Implements java. Removes the specified element from this set if it is present (optional operation). |
| AbstractEarlyFailingSet | back to summary |
|---|---|
| pack-priv AbstractEarlyFailingSet() | |
| add | back to summary |
|---|---|
| public boolean add(T entry) Overrides java. Implements java. Doc from java. Adds the specified element to this set if it is not already present
(optional operation). More formally, adds the specified element
The stipulation above does not imply that sets must accept all
elements; sets may refuse to add any particular element, including
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the elements from this set (optional operation). The set will be empty after this call returns.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object element) Overrides java. Implements java. Doc from java. Removes the specified element from this set if it is present
(optional operation). More formally, removes an element
| |