unbreak HashRange width with inappropriate ctor call

This commit is contained in:
Jonathan Shook 2023-06-06 14:53:40 -05:00
parent 422b513578
commit 9bc338e85c
3 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,8 @@ public class HashRange implements LongToIntFunction {
@Example({"HashRange(32L)","map the input to a number in the range 0-31, inclusive, of type int"})
public HashRange(int width) {
this(0,width);
this.minValue=0;
this.width=width;
}
@Example({"HashRange(35L,39L)","map the input to a number in the range 35-38, inclusive, of type int"})

View File

@ -41,7 +41,8 @@ public class HashRange implements LongUnaryOperator {
private final Hash hash = new Hash();
public HashRange(long width) {
this(0L,width);
this.minValue=0L;
this.width=width;
}
public HashRange(long minValue, long maxValue) {

View File

@ -32,7 +32,8 @@ public class HashRange implements IntUnaryOperator {
private final Hash hash = new Hash();
public HashRange(int width) {
this(0,width);
this.minValue=0;
this.width=width;
}
public HashRange(int minValue, int maxValue) {