package org.eclipse.collections.api.map.primitive;
import org.eclipse.collections.api.block.function.primitive.LongFunction;
import org.eclipse.collections.api.block.function.primitive.LongFunction0;
import org.eclipse.collections.api.block.function.primitive.LongToLongFunction;
import org.eclipse.collections.api.block.function.primitive.LongToObjectFunction;
import org.eclipse.collections.api.block.predicate.primitive.LongPredicate;
import org.eclipse.collections.api.block.procedure.primitive.LongProcedure;
import org.eclipse.collections.api.block.predicate.primitive.ObjectLongPredicate;
import org.eclipse.collections.api.collection.MutableCollection;
import org.eclipse.collections.api.collection.primitive.MutableLongCollection;
import org.eclipse.collections.api.iterator.MutableLongIterator;
import org.eclipse.collections.api.tuple.primitive.ObjectLongPair;
public interface MutableObjectLongMap<K> extends ObjectLongMap<K>
{
@Override
MutableLongIterator longIterator();
void clear();
void put(K key, long value);
default void putPair(ObjectLongPair<K> keyValuePair)
{
this.put(keyValuePair.getOne(), keyValuePair.getTwo());
}
void putAll(ObjectLongMap<? extends K> map);
void removeKey(K key);
void remove(Object key);
long removeKeyIfAbsent(K key, long value);
long getIfAbsentPut(K key, long value);
long getIfAbsentPut(K key, LongFunction0 function);
long getIfAbsentPutWithKey(K key, LongFunction<? super K> function);
<P> long getIfAbsentPutWith(K key, LongFunction<? super P> function, P parameter);
long updateValue(K key, long initialValueIfAbsent, LongToLongFunction function);
@Override
MutableLongObjectMap<K> flipUniqueValues();
@Override
MutableObjectLongMap<K> select(ObjectLongPredicate<? super K> predicate);
@Override
MutableObjectLongMap<K> reject(ObjectLongPredicate<? super K> predicate);
@Override
MutableLongCollection select(LongPredicate predicate);
@Override
MutableLongCollection reject(LongPredicate predicate);
default MutableObjectLongMap<K> tap(LongProcedure procedure)
{
this.forEach(procedure);
return this;
}
@Override
<V> MutableCollection<V> collect(LongToObjectFunction<? extends V> function);
MutableObjectLongMap<K> withKeyValue(K key, long value);
MutableObjectLongMap<K> withoutKey(K key);
MutableObjectLongMap<K> withoutAllKeys(Iterable<? extends K> keys);
MutableObjectLongMap<K> asUnmodifiable();
MutableObjectLongMap<K> asSynchronized();
long addToValue(K key, long toBeAdded);
}