package at.yawk.numaec;
import org.eclipse.collections.api.block.function.primitive.ByteFunction;
import org.eclipse.collections.api.block.function.primitive.IntFunction;
import org.eclipse.collections.api.factory.map.primitive.MutableIntByteMapFactory;
import org.eclipse.collections.api.map.primitive.MutableIntByteMap;
import org.eclipse.collections.api.map.primitive.IntByteMap;
public interface MutableIntByteBufferMapFactory extends MutableIntByteMapFactory {
@Override
MutableIntByteBufferMap empty();
@Override
default MutableIntByteBufferMap of() {
return empty();
}
@Override
default MutableIntByteBufferMap with() {
return empty();
}
@Override
MutableIntByteBufferMap ofInitialCapacity(int capacity);
@Override
default MutableIntByteBufferMap withInitialCapacity(int capacity) {
return ofInitialCapacity(capacity);
}
@Override
MutableIntByteBufferMap ofAll(IntByteMap map);
@Override
default MutableIntByteBufferMap withAll(IntByteMap map) {
return ofAll(map);
}
@Override
default <T> MutableIntByteMap from(
Iterable<T> iterable, IntFunction<? super T> keyFunction, ByteFunction<? super T> valueFunction
) {
MutableIntByteBufferMap n = empty();
for (T t : iterable) {
n.put(keyFunction.intValueOf(t), valueFunction.byteValueOf(t));
}
return n;
}
}