package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.IntIterable;
import org.eclipse.collections.api.block.function.primitive.IntFunction;
import org.eclipse.collections.api.block.function.primitive.IntFunction0;
import org.eclipse.collections.api.block.function.primitive.IntToIntFunction;
import org.eclipse.collections.api.block.function.primitive.IntIntToIntFunction;
import org.eclipse.collections.api.block.predicate.primitive.IntIntPredicate;
import org.eclipse.collections.api.tuple.primitive.IntIntPair;
public interface MutableIntIntMap extends IntIntMap, MutableIntValuesMap
{
void put(int key, int value);
default void putPair(IntIntPair keyValuePair)
{
this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(IntIntMap map);
void updateValues(IntIntToIntFunction function);
void removeKey(int key);
void remove(int key);
int removeKeyIfAbsent(int key, int value);
int getIfAbsentPut(int key, int value);
int getIfAbsentPut(int key, IntFunction0 function);
int getIfAbsentPutWithKey(int key, IntToIntFunction function);
<P> int getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter);
int updateValue(int key, int initialValueIfAbsent, IntToIntFunction function);
@Override
MutableIntIntMap flipUniqueValues();
@Override
MutableIntIntMap select(IntIntPredicate predicate);
@Override
MutableIntIntMap reject(IntIntPredicate predicate);
MutableIntIntMap withKeyValue(int key, int value);
MutableIntIntMap withoutKey(int key);
MutableIntIntMap withoutAllKeys(IntIterable keys);
default MutableIntIntMap withAllKeyValues(Iterable<IntIntPair> keyValuePairs)
{
for (IntIntPair keyValuePair : keyValuePairs)
{
this.putPair(keyValuePair);
}
return this;
}
MutableIntIntMap asUnmodifiable();
MutableIntIntMap asSynchronized();
int addToValue(int key, int toBeAdded);
}