package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.ShortIterable;
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.ShortToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.ShortObjectPredicate;
import org.eclipse.collections.api.block.procedure.Procedure;
import org.eclipse.collections.api.tuple.primitive.ShortObjectPair;
public interface MutableShortObjectMap<V> extends ShortObjectMap<V>, MutablePrimitiveObjectMap<V>
{
V put(short key, V value);
default V putPair(ShortObjectPair<V> keyValuePair)
{
return this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(ShortObjectMap<? extends V> map);
V removeKey(short key);
V remove(short key);
V getIfAbsentPut(short key, V value);
V getIfAbsentPut(short key, Function0<? extends V> function);
V getIfAbsentPutWithKey(short key, ShortToObjectFunction<? extends V> function);
<P> V getIfAbsentPutWith(short key, Function<? super P, ? extends V> function, P parameter);
V updateValue(short key, Function0<? extends V> factory, Function<? super V, ? extends V> function);
<P> V updateValueWith(short key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter);
@Override
MutableObjectShortMap<V> flipUniqueValues();
@Override
MutableShortObjectMap<V> tap(Procedure<? super V> procedure);
@Override
MutableShortObjectMap<V> select(ShortObjectPredicate<? super V> predicate);
@Override
MutableShortObjectMap<V> reject(ShortObjectPredicate<? super V> predicate);
MutableShortObjectMap<V> withKeyValue(short key, V value);
MutableShortObjectMap<V> withoutKey(short key);
MutableShortObjectMap<V> withoutAllKeys(ShortIterable keys);
default MutableShortObjectMap<V> withAllKeyValues(Iterable<ShortObjectPair<V>> keyValuePairs)
{
for (ShortObjectPair<V> keyValuePair : keyValuePairs)
{
this.putPair(keyValuePair);
}
return this;
}
MutableShortObjectMap<V> asUnmodifiable();
MutableShortObjectMap<V> asSynchronized();
}