* Note that general maps return only a {@link Collection} since they do not ensure uniqueness of their values.
*
* @return read-only {@link Set} view of this map's values
*/
@Override
public Set
* Do not use {@link Map.Entry#setValue(Object)}!
* {@code setValue} changes only one side of this BidirectionalMap.
* Changing values using {@code setValue} breaks this map.
*
* @return read-only {@link Set} view of this map's mappings
*/
@Override
public Set
* The outcome may depend on the iteration order of the specified map
* unless all of the following propositions hold:
*
*
*
* @param m mappings to be stored in this map
*/
@Override
public void putAll(Map extends K,? extends V> m) {
for (final Map.Entry extends K,? extends V> e : m.entrySet()) {
put(e.getKey(), e.getValue());
}
}
@Override
public V computeIfAbsent(final K key, final Function super K, ? extends V> mappingFunction) {
final var value = super.computeIfAbsent(key, mappingFunction);
if (value != null) {
mInverse.putAsymmetric(value, key);
}
return value;
}
// equals() and hashCode() from super class work for this implementation
}