fix range bounds check

This commit is contained in:
dfsek committed 2022-05-29 23:49:25 -07:00
1 parent da28244f81
commit ef1f1c0af0
1 file changed
+1 -1
@@ -19,7 +19,7 @@ public class ConstantRange implements Range {
private int max;
public ConstantRange(int min, int max) {
if(min > max) throw new IllegalArgumentException("Minimum must not be greater than maximum!");
if(min >= max) throw new IllegalArgumentException("Minimum must not be greater than or equal to maximum!");
this.max = max;
this.min = min;
}