Added primitive contains() to float and double ranges.
This commit is contained in:
@@ -35,6 +35,10 @@ public final class DoubleRange implements Range<Double>, NumberSequence<Double>
|
||||
return start <= item && item <= end;
|
||||
}
|
||||
|
||||
public boolean contains(double item) {
|
||||
return start <= item && item <= end;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double getStart() {
|
||||
return start;
|
||||
|
||||
@@ -35,6 +35,10 @@ public final class FloatRange implements Range<Float>, NumberSequence<Float> {
|
||||
return start <= item && item <= end;
|
||||
}
|
||||
|
||||
public boolean contains(float item) {
|
||||
return start <= item && item <= end;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getStart() {
|
||||
return start;
|
||||
|
||||
Reference in New Issue
Block a user