io.nosqlbench.virtdata.library.basics.shared.unary_int.HashRange Maven / Gradle / Ivy
package io.nosqlbench.virtdata.library.basics.shared.unary_int;
import io.nosqlbench.nb.api.errors.BasicError;
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
import java.util.function.IntUnaryOperator;
@ThreadSafeMapper
public class HashRange implements IntUnaryOperator {
private final int minValue;
private final int width;
private final Hash hash = new Hash();
public HashRange(int width) {
this.minValue=0;
this.width=width;
}
public HashRange(int minValue, int maxValue) {
if (maxValue