package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.ShortIterable;
import org.eclipse.collections.api.block.function.primitive.ShortToDoubleFunction;
import org.eclipse.collections.api.block.function.primitive.DoubleFunction;
import org.eclipse.collections.api.block.function.primitive.DoubleFunction0;
import org.eclipse.collections.api.block.function.primitive.DoubleToDoubleFunction;
import org.eclipse.collections.api.block.function.primitive.ShortDoubleToDoubleFunction;
import org.eclipse.collections.api.block.predicate.primitive.ShortDoublePredicate;
import org.eclipse.collections.api.tuple.primitive.ShortDoublePair;
public interface MutableShortDoubleMap extends ShortDoubleMap, MutableDoubleValuesMap
{
void put(short key, double value);
default void putPair(ShortDoublePair keyValuePair)
{
this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(ShortDoubleMap map);
void updateValues(ShortDoubleToDoubleFunction function);
void removeKey(short key);
void remove(short key);
double removeKeyIfAbsent(short key, double value);
double getIfAbsentPut(short key, double value);
double getIfAbsentPut(short key, DoubleFunction0 function);
double getIfAbsentPutWithKey(short key, ShortToDoubleFunction function);
<P> double getIfAbsentPutWith(short key, DoubleFunction<? super P> function, P parameter);
double updateValue(short key, double initialValueIfAbsent, DoubleToDoubleFunction function);
@Override
MutableDoubleShortMap flipUniqueValues();
@Override
MutableShortDoubleMap select(ShortDoublePredicate predicate);
@Override
MutableShortDoubleMap reject(ShortDoublePredicate predicate);
MutableShortDoubleMap withKeyValue(short key, double value);
MutableShortDoubleMap withoutKey(short key);
MutableShortDoubleMap withoutAllKeys(ShortIterable keys);
default MutableShortDoubleMap withAllKeyValues(Iterable<ShortDoublePair> keyValuePairs)
{
for (ShortDoublePair keyValuePair : keyValuePairs)
{
this.putPair(keyValuePair);
}
return this;
}
MutableShortDoubleMap asUnmodifiable();
MutableShortDoubleMap asSynchronized();
double addToValue(short key, double toBeAdded);
}