package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.CharIterable;
import org.eclipse.collections.api.block.function.primitive.CharToIntFunction;
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.CharIntToIntFunction;
import org.eclipse.collections.api.block.predicate.primitive.CharIntPredicate;
import org.eclipse.collections.api.tuple.primitive.CharIntPair;
public interface MutableCharIntMap extends CharIntMap, MutableIntValuesMap
{
void put(char key, int value);
default void putPair(CharIntPair keyValuePair)
{
this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(CharIntMap map);
void updateValues(CharIntToIntFunction function);
void removeKey(char key);
void remove(char key);
int removeKeyIfAbsent(char key, int value);
int getIfAbsentPut(char key, int value);
int getIfAbsentPut(char key, IntFunction0 function);
int getIfAbsentPutWithKey(char key, CharToIntFunction function);
<P> int getIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter);
int updateValue(char key, int initialValueIfAbsent, IntToIntFunction function);
@Override
MutableIntCharMap flipUniqueValues();
@Override
MutableCharIntMap select(CharIntPredicate predicate);
@Override
MutableCharIntMap reject(CharIntPredicate predicate);
MutableCharIntMap withKeyValue(char key, int value);
MutableCharIntMap withoutKey(char key);
MutableCharIntMap withoutAllKeys(CharIterable keys);
default MutableCharIntMap withAllKeyValues(Iterable<CharIntPair> keyValuePairs)
{
for (CharIntPair keyValuePair : keyValuePairs)
{
this.putPair(keyValuePair);
}
return this;
}
MutableCharIntMap asUnmodifiable();
MutableCharIntMap asSynchronized();
int addToValue(char key, int toBeAdded);
}