package at.yawk.numaec;
import org.eclipse.collections.api.block.function.primitive.DoubleFunction;
import org.eclipse.collections.api.block.function.primitive.IntFunction;
import org.eclipse.collections.api.factory.map.primitive.MutableIntDoubleMapFactory;
import org.eclipse.collections.api.map.primitive.MutableIntDoubleMap;
import org.eclipse.collections.api.map.primitive.IntDoubleMap;
public interface MutableIntDoubleBufferMapFactory extends MutableIntDoubleMapFactory {
@Override
MutableIntDoubleBufferMap empty();
@Override
default MutableIntDoubleBufferMap of() {
return empty();
}
@Override
default MutableIntDoubleBufferMap with() {
return empty();
}
@Override
MutableIntDoubleBufferMap ofInitialCapacity(int capacity);
@Override
default MutableIntDoubleBufferMap withInitialCapacity(int capacity) {
return ofInitialCapacity(capacity);
}
@Override
MutableIntDoubleBufferMap ofAll(IntDoubleMap map);
@Override
default MutableIntDoubleBufferMap withAll(IntDoubleMap map) {
return ofAll(map);
}
@Override
default <T> MutableIntDoubleMap from(
Iterable<T> iterable, IntFunction<? super T> keyFunction, DoubleFunction<? super T> valueFunction
) {
MutableIntDoubleBufferMap n = empty();
for (T t : iterable) {
n.put(keyFunction.intValueOf(t), valueFunction.doubleValueOf(t));
}
return n;
}
}