package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.block.function.primitive.ShortFunction;
import org.eclipse.collections.api.block.function.primitive.ShortFunction0;
import org.eclipse.collections.api.block.function.primitive.ShortToShortFunction;
import org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction;
import org.eclipse.collections.api.block.function.primitive.ObjectShortToShortFunction;
import org.eclipse.collections.api.block.predicate.primitive.ShortPredicate;
import org.eclipse.collections.api.block.procedure.primitive.ShortProcedure;
import org.eclipse.collections.api.block.predicate.primitive.ObjectShortPredicate;
import org.eclipse.collections.api.collection.MutableCollection;
import org.eclipse.collections.api.collection.primitive.MutableShortCollection;
import org.eclipse.collections.api.iterator.MutableShortIterator;
import org.eclipse.collections.api.tuple.primitive.ObjectShortPair;
public interface MutableObjectShortMap<K> extends ObjectShortMap<K>
{
@Override
MutableShortIterator shortIterator();
void clear();
void put(K key, short value);
default void putPair(ObjectShortPair<K> keyValuePair)
{
this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(ObjectShortMap<? extends K> map);
void updateValues(ObjectShortToShortFunction<? super K> function);
void removeKey(K key);
void remove(Object key);
short removeKeyIfAbsent(K key, short value);
short getIfAbsentPut(K key, short value);
short getIfAbsentPut(K key, ShortFunction0 function);
short getIfAbsentPutWithKey(K key, ShortFunction<? super K> function);
<P> short getIfAbsentPutWith(K key, ShortFunction<? super P> function, P parameter);
short updateValue(K key, short initialValueIfAbsent, ShortToShortFunction function);
@Override
MutableShortObjectMap<K> flipUniqueValues();
@Override
MutableObjectShortMap<K> select(ObjectShortPredicate<? super K> predicate);
@Override
MutableObjectShortMap<K> reject(ObjectShortPredicate<? super K> predicate);
@Override
MutableShortCollection select(ShortPredicate predicate);
@Override
MutableShortCollection reject(ShortPredicate predicate);
default MutableObjectShortMap<K> tap(ShortProcedure procedure)
{
this.forEach(procedure);
return this;
}
@Override
<V> MutableCollection<V> collect(ShortToObjectFunction<? extends V> function);
MutableObjectShortMap<K> withKeyValue(K key, short value);
MutableObjectShortMap<K> withoutKey(K key);
MutableObjectShortMap<K> withoutAllKeys(Iterable<? extends K> keys);
default MutableObjectShortMap<K> withAllKeyValues(Iterable<ObjectShortPair<K>> keyValuePairs)
{
for (ObjectShortPair<K> keyValuePair : keyValuePairs)
{
this.putPair(keyValuePair);
}
return this;
}
MutableObjectShortMap<K> asUnmodifiable();
MutableObjectShortMap<K> asSynchronized();
short addToValue(K key, short toBeAdded);
}