All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.collections.impl.bimap.mutable.UnmodifiableBiMap Maven / Gradle / Ivy

There is a newer version: 12.0.0.M3
Show newest version
/*
 * Copyright (c) 2020 Goldman Sachs and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Eclipse Distribution License v. 1.0 which accompany this distribution.
 * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 * and the Eclipse Distribution License is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 */

package org.eclipse.collections.impl.bimap.mutable;

import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Map;
import java.util.Optional;
import java.util.Set;

import org.eclipse.collections.api.BooleanIterable;
import org.eclipse.collections.api.ByteIterable;
import org.eclipse.collections.api.CharIterable;
import org.eclipse.collections.api.DoubleIterable;
import org.eclipse.collections.api.FloatIterable;
import org.eclipse.collections.api.IntIterable;
import org.eclipse.collections.api.LazyIterable;
import org.eclipse.collections.api.LongIterable;
import org.eclipse.collections.api.RichIterable;
import org.eclipse.collections.api.ShortIterable;
import org.eclipse.collections.api.bag.MutableBag;
import org.eclipse.collections.api.bag.sorted.MutableSortedBag;
import org.eclipse.collections.api.bimap.ImmutableBiMap;
import org.eclipse.collections.api.bimap.MutableBiMap;
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.block.function.Function0;
import org.eclipse.collections.api.block.function.Function2;
import org.eclipse.collections.api.block.function.primitive.BooleanFunction;
import org.eclipse.collections.api.block.function.primitive.ByteFunction;
import org.eclipse.collections.api.block.function.primitive.CharFunction;
import org.eclipse.collections.api.block.function.primitive.DoubleFunction;
import org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction;
import org.eclipse.collections.api.block.function.primitive.FloatFunction;
import org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction;
import org.eclipse.collections.api.block.function.primitive.IntFunction;
import org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction;
import org.eclipse.collections.api.block.function.primitive.LongFunction;
import org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction;
import org.eclipse.collections.api.block.function.primitive.ShortFunction;
import org.eclipse.collections.api.block.predicate.Predicate;
import org.eclipse.collections.api.block.predicate.Predicate2;
import org.eclipse.collections.api.block.procedure.Procedure;
import org.eclipse.collections.api.block.procedure.Procedure2;
import org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure;
import org.eclipse.collections.api.collection.primitive.MutableBooleanCollection;
import org.eclipse.collections.api.collection.primitive.MutableByteCollection;
import org.eclipse.collections.api.collection.primitive.MutableCharCollection;
import org.eclipse.collections.api.collection.primitive.MutableDoubleCollection;
import org.eclipse.collections.api.collection.primitive.MutableFloatCollection;
import org.eclipse.collections.api.collection.primitive.MutableIntCollection;
import org.eclipse.collections.api.collection.primitive.MutableLongCollection;
import org.eclipse.collections.api.collection.primitive.MutableShortCollection;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.map.MutableMapIterable;
import org.eclipse.collections.api.map.primitive.MutableObjectDoubleMap;
import org.eclipse.collections.api.map.primitive.MutableObjectLongMap;
import org.eclipse.collections.api.map.sorted.MutableSortedMap;
import org.eclipse.collections.api.multimap.MutableMultimap;
import org.eclipse.collections.api.multimap.set.MutableSetMultimap;
import org.eclipse.collections.api.partition.set.PartitionMutableSet;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.set.sorted.MutableSortedSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.UnmodifiableIteratorAdapter;

public class UnmodifiableBiMap implements MutableBiMap, Serializable
{
    private static final long serialVersionUID = 1L;

    protected final MutableBiMap delegate;

    public UnmodifiableBiMap(MutableBiMap delegate)
    {
        if (delegate == null)
        {
            throw new IllegalArgumentException("Cannot create an UnmodifiableBiMap for null");
        }
        this.delegate = delegate;
    }

    public static  UnmodifiableBiMap of(MutableBiMap biMap)
    {
        return new UnmodifiableBiMap<>(biMap);
    }

    public static  UnmodifiableBiMap of(Map map)
    {
        if (map == null)
        {
            throw new IllegalArgumentException("cannot create a UnmodifiableBiMap for null");
        }
        return new UnmodifiableBiMap<>(new HashBiMap<>(map));
    }

    @Override
    public MutableBiMap newEmpty()
    {
        return this.delegate.newEmpty();
    }

    @Override
    public MutableBiMap inverse()
    {
        return this.delegate.inverse().asUnmodifiable();
    }

    @Override
    public V getIfAbsent(K key, Function0 function)
    {
        return this.delegate.getIfAbsent(key, function);
    }

    @Override
    public V getIfAbsentValue(K key, V value)
    {
        return this.delegate.getIfAbsentValue(key, value);
    }

    @Override
    public 

V getIfAbsentWith(K key, Function function, P parameter) { return this.delegate.getIfAbsentWith(key, function, parameter); } @Override public A ifPresentApply(K key, Function function) { return this.delegate.ifPresentApply(key, function); } @Override public int size() { return this.delegate.size(); } @Override public boolean equals(Object o) { return this.delegate.equals(o); } @Override public int hashCode() { return this.delegate.hashCode(); } @Override public String toString() { return this.delegate.toString(); } @Override public Set> entrySet() { return Collections.unmodifiableMap(this.delegate).entrySet(); } @Override public Set keySet() { return Collections.unmodifiableSet(this.delegate.keySet()); } @Override public Collection values() { return Collections.unmodifiableCollection(this.delegate.values()); } @Override public RichIterable keysView() { return this.delegate.keysView(); } @Override public RichIterable valuesView() { return this.delegate.valuesView(); } @Override public RichIterable> keyValuesView() { return this.delegate.keyValuesView(); } @Override public Iterator iterator() { return new UnmodifiableIteratorAdapter<>(this.delegate.iterator()); } @Override public V get(Object key) { return this.delegate.get(key); } @Override public V getFirst() { return this.delegate.getFirst(); } @Override public V getLast() { return this.delegate.getLast(); } @Override public V getOnly() { return this.delegate.getOnly(); } @Override public boolean isEmpty() { return this.delegate.isEmpty(); } @Override public boolean notEmpty() { return this.delegate.notEmpty(); } @Override public boolean contains(Object object) { return this.delegate.contains(object); } @Override public boolean containsAllIterable(Iterable source) { return this.delegate.containsAllIterable(source); } @Override public boolean containsAll(Collection source) { return this.delegate.containsAll(source); } @Override public boolean containsAllArguments(Object... elements) { return this.delegate.containsAllArguments(elements); } @Override public boolean containsKey(Object key) { return this.delegate.containsKey(key); } @Override public boolean containsValue(Object value) { return this.delegate.containsValue(value); } @Override public MutableSetMultimap flip() { return this.delegate.flip(); } @Override public MutableBiMap flipUniqueValues() { return this.delegate.flipUniqueValues(); } @Override public MutableBiMap clone() { return this; } @Override public LazyIterable asLazy() { return this.delegate.asLazy(); } @Override public MutableBiMap asSynchronized() { return SynchronizedBiMap.of(this); } @Override public MutableBiMap asUnmodifiable() { return this; } @Override public MutableBiMap tap(Procedure procedure) { this.forEach(procedure); return this; } @Override public void each(Procedure procedure) { this.delegate.each(procedure); } @Override public void forEachWithIndex(ObjectIntProcedure objectIntProcedure) { this.delegate.forEachWithIndex(objectIntProcedure); } @Override public

void forEachWith(Procedure2 procedure, P parameter) { this.delegate.forEachWith(procedure, parameter); } @Override public void forEachKey(Procedure procedure) { this.delegate.forEachKey(procedure); } @Override public void forEachValue(Procedure procedure) { this.delegate.forEachValue(procedure); } @Override public void forEachKeyValue(Procedure2 procedure) { this.delegate.forEachKeyValue(procedure); } @Override public MutableBiMap select(Predicate2 predicate) { return this.delegate.select(predicate); } @Override public MutableSet select(Predicate predicate) { return this.delegate.select(predicate); } @Override public > R select(Predicate predicate, R target) { return this.delegate.select(predicate, target); } @Override public

MutableSet selectWith(Predicate2 predicate, P parameter) { return this.delegate.selectWith(predicate, parameter); } @Override public > R selectWith(Predicate2 predicate, P parameter, R targetCollection) { return this.delegate.selectWith(predicate, parameter, targetCollection); } @Override public MutableBiMap reject(Predicate2 predicate) { return this.delegate.reject(predicate); } @Override public MutableSet reject(Predicate predicate) { return this.delegate.reject(predicate); } @Override public > R reject(Predicate predicate, R target) { return this.delegate.reject(predicate, target); } @Override public

MutableSet rejectWith(Predicate2 predicate, P parameter) { return this.delegate.rejectWith(predicate, parameter); } @Override public > R rejectWith(Predicate2 predicate, P parameter, R targetCollection) { return this.delegate.rejectWith(predicate, parameter, targetCollection); } @Override public PartitionMutableSet partition(Predicate predicate) { return this.delegate.partition(predicate); } @Override public

PartitionMutableSet partitionWith(Predicate2 predicate, P parameter) { return this.delegate.partitionWith(predicate, parameter); } @Override public MutableSet selectInstancesOf(Class clazz) { return this.delegate.selectInstancesOf(clazz); } @Override public Pair detect(Predicate2 predicate) { return this.delegate.detect(predicate); } @Override public V detect(Predicate predicate) { return this.delegate.detect(predicate); } @Override public

V detectWith(Predicate2 predicate, P parameter) { return this.delegate.detectWith(predicate, parameter); } @Override public Optional> detectOptional(Predicate2 predicate) { return this.delegate.detectOptional(predicate); } @Override public Optional detectOptional(Predicate predicate) { return this.delegate.detectOptional(predicate); } @Override public

Optional detectWithOptional(Predicate2 predicate, P parameter) { return this.delegate.detectWithOptional(predicate, parameter); } @Override public V detectIfNone(Predicate predicate, Function0 function) { return this.delegate.detectIfNone(predicate, function); } @Override public

V detectWithIfNone(Predicate2 predicate, P parameter, Function0 function) { return this.delegate.detectWithIfNone(predicate, parameter, function); } @Override public int count(Predicate predicate) { return this.delegate.count(predicate); } @Override public

int countWith(Predicate2 predicate, P parameter) { return this.delegate.countWith(predicate, parameter); } @Override public boolean anySatisfy(Predicate predicate) { return this.delegate.anySatisfy(predicate); } @Override public

boolean anySatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.anySatisfyWith(predicate, parameter); } @Override public boolean allSatisfy(Predicate predicate) { return this.delegate.allSatisfy(predicate); } @Override public

boolean allSatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.allSatisfyWith(predicate, parameter); } @Override public boolean noneSatisfy(Predicate predicate) { return this.delegate.noneSatisfy(predicate); } @Override public

boolean noneSatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.noneSatisfyWith(predicate, parameter); } @Override public MutableBiMap collect(Function2> function) { return this.delegate.collect(function); } @Override public RichIterable collect(Function function) { return this.delegate.collect(function); } @Override public > R collect(Function function, R target) { return this.delegate.collect(function, target); } @Override public RichIterable collectWith(Function2 function, P parameter) { return this.delegate.collectWith(function, parameter); } @Override public > R collectWith(Function2 function, P parameter, R targetCollection) { return this.delegate.collectWith(function, parameter, targetCollection); } @Override public MutableBiMap collectValues(Function2 function) { return this.delegate.collectValues(function); } @Override public BooleanIterable collectBoolean(BooleanFunction booleanFunction) { return this.delegate.collectBoolean(booleanFunction); } @Override public R collectBoolean(BooleanFunction booleanFunction, R target) { return this.delegate.collectBoolean(booleanFunction, target); } @Override public R flatCollectBoolean( Function function, R target) { return this.delegate.flatCollectBoolean(function, target); } @Override public ByteIterable collectByte(ByteFunction byteFunction) { return this.delegate.collectByte(byteFunction); } @Override public R collectByte(ByteFunction byteFunction, R target) { return this.delegate.collectByte(byteFunction, target); } @Override public R flatCollectByte( Function function, R target) { return this.delegate.flatCollectByte(function, target); } @Override public CharIterable collectChar(CharFunction charFunction) { return this.delegate.collectChar(charFunction); } @Override public R collectChar(CharFunction charFunction, R target) { return this.delegate.collectChar(charFunction, target); } @Override public R flatCollectChar( Function function, R target) { return this.delegate.flatCollectChar(function, target); } @Override public DoubleIterable collectDouble(DoubleFunction doubleFunction) { return this.delegate.collectDouble(doubleFunction); } @Override public R collectDouble(DoubleFunction doubleFunction, R target) { return this.delegate.collectDouble(doubleFunction, target); } @Override public R flatCollectDouble( Function function, R target) { return this.delegate.flatCollectDouble(function, target); } @Override public FloatIterable collectFloat(FloatFunction floatFunction) { return this.delegate.collectFloat(floatFunction); } @Override public R collectFloat(FloatFunction floatFunction, R target) { return this.delegate.collectFloat(floatFunction, target); } @Override public R flatCollectFloat( Function function, R target) { return this.delegate.flatCollectFloat(function, target); } @Override public IntIterable collectInt(IntFunction intFunction) { return this.delegate.collectInt(intFunction); } @Override public R collectInt(IntFunction intFunction, R target) { return this.delegate.collectInt(intFunction, target); } @Override public R flatCollectInt( Function function, R target) { return this.delegate.flatCollectInt(function, target); } @Override public LongIterable collectLong(LongFunction longFunction) { return this.delegate.collectLong(longFunction); } @Override public R collectLong(LongFunction longFunction, R target) { return this.delegate.collectLong(longFunction, target); } @Override public R flatCollectLong( Function function, R target) { return this.delegate.flatCollectLong(function, target); } @Override public ShortIterable collectShort(ShortFunction shortFunction) { return this.delegate.collectShort(shortFunction); } @Override public R collectShort(ShortFunction shortFunction, R target) { return this.delegate.collectShort(shortFunction, target); } @Override public R flatCollectShort( Function function, R target) { return this.delegate.flatCollectShort(function, target); } @Override public RichIterable collectIf(Predicate predicate, Function function) { return this.delegate.collectIf(predicate, function); } @Override public > R collectIf(Predicate predicate, Function function, R target) { return this.delegate.collectIf(predicate, function, target); } @Override public RichIterable flatCollect(Function> function) { return this.delegate.flatCollect(function); } @Override public > R flatCollect(Function> function, R target) { return this.delegate.flatCollect(function, target); } @Override public IV injectInto(IV injectedValue, Function2 function) { return this.delegate.injectInto(injectedValue, function); } @Override public int injectInto(int injectedValue, IntObjectToIntFunction function) { return this.delegate.injectInto(injectedValue, function); } @Override public long injectInto(long injectedValue, LongObjectToLongFunction function) { return this.delegate.injectInto(injectedValue, function); } @Override public float injectInto(float injectedValue, FloatObjectToFloatFunction function) { return this.delegate.injectInto(injectedValue, function); } @Override public double injectInto(double injectedValue, DoubleObjectToDoubleFunction function) { return this.delegate.injectInto(injectedValue, function); } @Override public > R into(R target) { return this.delegate.into(target); } @Override public ImmutableBiMap toImmutable() { return this.delegate.toImmutable(); } @Override public MutableList toList() { return this.delegate.toList(); } @Override public MutableList toSortedList() { return this.delegate.toSortedList(); } @Override public MutableList toSortedList(Comparator comparator) { return this.delegate.toSortedList(comparator); } @Override public > MutableList toSortedListBy(Function function) { return this.delegate.toSortedListBy(function); } @Override public MutableSet toSet() { return this.delegate.toSet(); } @Override public MutableSortedSet toSortedSet() { return this.delegate.toSortedSet(); } @Override public MutableSortedSet toSortedSet(Comparator comparator) { return this.delegate.toSortedSet(comparator); } @Override public > MutableSortedSet toSortedSetBy(Function function) { return this.delegate.toSortedSetBy(function); } @Override public MutableBag toBag() { return this.delegate.toBag(); } @Override public MutableSortedBag toSortedBag() { return this.delegate.toSortedBag(); } @Override public MutableSortedBag toSortedBag(Comparator comparator) { return this.delegate.toSortedBag(comparator); } @Override public > MutableSortedBag toSortedBagBy(Function function) { return this.delegate.toSortedBagBy(function); } @Override public MutableMap toMap(Function keyFunction, Function valueFunction) { return this.delegate.toMap(keyFunction, valueFunction); } @Override public > R toMap(Function keyFunction, Function valueFunction, R target) { return this.delegate.toMap(keyFunction, valueFunction, target); } @Override public MutableSortedMap toSortedMap(Function keyFunction, Function valueFunction) { return this.delegate.toSortedMap(keyFunction, valueFunction); } @Override public MutableSortedMap toSortedMap(Comparator comparator, Function keyFunction, Function valueFunction) { return this.delegate.toSortedMap(comparator, keyFunction, valueFunction); } @Override public MutableBiMap toBiMap(Function keyFunction, Function valueFunction) { return this.delegate.toBiMap(keyFunction, valueFunction); } @Override public , NK, NV> MutableSortedMap toSortedMapBy(Function sortBy, Function keyFunction, Function valueFunction) { return this.delegate.toSortedMapBy(sortBy, keyFunction, valueFunction); } @Override public Object[] toArray() { return this.delegate.toArray(); } @Override public T[] toArray(T[] target) { return this.delegate.toArray(target); } @Override public V min(Comparator comparator) { return this.delegate.min(comparator); } @Override public V min() { return this.delegate.min(); } @Override public > V minBy(Function function) { return this.delegate.minBy(function); } @Override public V max(Comparator comparator) { return this.delegate.max(comparator); } @Override public V max() { return this.delegate.max(); } @Override public > V maxBy(Function function) { return this.delegate.maxBy(function); } @Override public long sumOfInt(IntFunction function) { return this.delegate.sumOfInt(function); } @Override public double sumOfFloat(FloatFunction function) { return this.delegate.sumOfFloat(function); } @Override public long sumOfLong(LongFunction function) { return this.delegate.sumOfLong(function); } @Override public double sumOfDouble(DoubleFunction function) { return this.delegate.sumOfDouble(function); } @Override public MutableObjectLongMap sumByInt(Function groupBy, IntFunction function) { return this.delegate.sumByInt(groupBy, function); } @Override public MutableObjectDoubleMap sumByFloat(Function groupBy, FloatFunction function) { return this.delegate.sumByFloat(groupBy, function); } @Override public MutableObjectLongMap sumByLong(Function groupBy, LongFunction function) { return this.delegate.sumByLong(groupBy, function); } @Override public MutableObjectDoubleMap sumByDouble(Function groupBy, DoubleFunction function) { return this.delegate.sumByDouble(groupBy, function); } @Override public String makeString() { return this.delegate.makeString(); } @Override public String makeString(String separator) { return this.delegate.makeString(separator); } @Override public String makeString(String start, String separator, String end) { return this.delegate.makeString(start, separator, end); } @Override public void appendString(Appendable appendable) { this.delegate.appendString(appendable); } @Override public void appendString(Appendable appendable, String separator) { this.delegate.appendString(appendable, separator); } @Override public void appendString(Appendable appendable, String start, String separator, String end) { this.delegate.appendString(appendable, start, separator, end); } @Override public MutableSet> zip(Iterable that) { return this.delegate.zip(that); } @Override public >> R zip(Iterable that, R target) { return this.delegate.zip(that, target); } @Override public MutableSet> zipWithIndex() { return this.delegate.zipWithIndex(); } @Override public >> R zipWithIndex(R target) { return this.delegate.zipWithIndex(target); } @Override public RichIterable> chunk(int size) { return this.delegate.chunk(size); } @Override public MutableMap aggregateInPlaceBy(Function groupBy, Function0 zeroValueFactory, Procedure2 mutatingAggregator) { return this.delegate.aggregateInPlaceBy(groupBy, zeroValueFactory, mutatingAggregator); } @Override public MutableMap aggregateBy(Function groupBy, Function0 zeroValueFactory, Function2 nonMutatingAggregator) { return this.delegate.aggregateBy(groupBy, zeroValueFactory, nonMutatingAggregator); } @Override public MutableMap aggregateBy( Function keyFunction, Function valueFunction, Function0 zeroValueFactory, Function2 nonMutatingAggregator) { return this.delegate.aggregateBy(keyFunction, valueFunction, zeroValueFactory, nonMutatingAggregator); } @Override public MutableSetMultimap groupBy(Function function) { return this.delegate.groupBy(function); } @Override public > R groupBy(Function function, R target) { return this.delegate.groupBy(function, target); } @Override public MutableSetMultimap groupByEach(Function> function) { return this.delegate.groupByEach(function); } @Override public > R groupByEach(Function> function, R target) { return this.delegate.groupByEach(function, target); } @Override public MutableBiMap groupByUniqueKey(Function function) { return this.delegate.groupByUniqueKey(function); } @Override public > R groupByUniqueKey(Function function, R target) { return this.delegate.groupByUniqueKey(function, target); } @Override public V put(K key, V value) { throw new UnsupportedOperationException("Cannot call put() on " + this.getClass().getSimpleName()); } @Override public void putAll(Map m) { throw new UnsupportedOperationException("Cannot call putAll() on " + this.getClass().getSimpleName()); } @Override public V forcePut(K key, V value) { throw new UnsupportedOperationException("Cannot call forcePut() on " + this.getClass().getSimpleName()); } @Override public V putPair(Pair keyValuePair) { throw new UnsupportedOperationException("Cannot call putPair() on " + this.getClass().getSimpleName()); } @Override public V add(Pair keyValuePair) { throw new UnsupportedOperationException("Cannot call add() on " + this.getClass().getSimpleName()); } @Override public V remove(Object key) { throw new UnsupportedOperationException("Cannot call remove() on " + this.getClass().getSimpleName()); } @Override public V removeKey(K key) { throw new UnsupportedOperationException("Cannot call removeKey() on " + this.getClass().getSimpleName()); } @Override public boolean removeAllKeys(Set keys) { throw new UnsupportedOperationException("Cannot call removeAllKeys() on " + this.getClass().getSimpleName()); } @Override public boolean removeIf(Predicate2 predicate) { throw new UnsupportedOperationException("Cannot call removeIf() on " + this.getClass().getSimpleName()); } @Override public void clear() { throw new UnsupportedOperationException("Cannot call clear() on " + this.getClass().getSimpleName()); } @Override public V getIfAbsentPut(K key, Function0 function) { throw new UnsupportedOperationException("Cannot call getIfAbsentPut() on " + this.getClass().getSimpleName()); } @Override public V getIfAbsentPut(K key, V value) { throw new UnsupportedOperationException("Cannot call getIfAbsentPut() on " + this.getClass().getSimpleName()); } @Override public V getIfAbsentPutWithKey(K key, Function function) { throw new UnsupportedOperationException("Cannot call getIfAbsentPutWithKey() on " + this.getClass().getSimpleName()); } @Override public

V getIfAbsentPutWith(K key, Function function, P parameter) { throw new UnsupportedOperationException("Cannot call getIfAbsentPutWith() on " + this.getClass().getSimpleName()); } @Override public V updateValue(K key, Function0 factory, Function function) { throw new UnsupportedOperationException("Cannot call updateValue() on " + this.getClass().getSimpleName()); } @Override public

V updateValueWith(K key, Function0 factory, Function2 function, P parameter) { throw new UnsupportedOperationException("Cannot call updateValueWith() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withKeyValue(K key, V value) { throw new UnsupportedOperationException("Cannot call withKeyValue() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withMap(Map map) { throw new UnsupportedOperationException("Cannot call withMap() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withAllKeyValues(Iterable> keyValues) { throw new UnsupportedOperationException("Cannot call withAllKeyValues() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withAllKeyValueArguments(Pair... keyValuePairs) { throw new UnsupportedOperationException("Cannot call keyValuePairs() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withoutKey(K key) { throw new UnsupportedOperationException("Cannot call withoutKey() on " + this.getClass().getSimpleName()); } @Override public MutableBiMap withoutAllKeys(Iterable keys) { throw new UnsupportedOperationException("Cannot call withoutAllKeys() on " + this.getClass().getSimpleName()); } }