protected static class BinaryData.RangeCheck
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
high
The upper bound of the range (inclusive).
|
private long |
low
The lower bound of the range (inclusive).
|
private long |
value
The value to be tested.
|
Constructor and Description |
---|
RangeCheck(long low,
long high,
long value)
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
check()
Check that the value is greater than or equal to the lower bound and less than or equal
to the upper bound.
|
static void |
check(long value,
long low,
long high)
Check that the value is greater than or equal to the lower bound and less than or equal
to the upper bound.
|
private long low
private long high
private long value
public RangeCheck(long low, long high, long value)
low
- The lower bound of the range (inclusive).high
- The upper bound of the range (inclusive).value
- The value to be tested.public static void check(long value, long low, long high)
BinaryData.RangeCheck
except it does not
create additional objects on the heap.low
- The lower bound of the range (inclusive).high
- The upper bound of the range (inclusive).value
- The value to be tested.ErrorConditionException
- If the range check fails.public void check() throws ErrorConditionException
ErrorConditionException
- If the range check fails.