@Deprecated public class IntervalConstraint extends Object implements ParameterConstraint<Number>
NumberParameter
) tested has to be greater than (or equal to, if specified) than the
specified low constraint value and less than (or equal to, if specified) than
the specified high constraint value.Modifier and Type | Class and Description |
---|---|
static class |
IntervalConstraint.IntervalBoundary
Deprecated.
Available interval boundary types types:
IntervalConstraint.IntervalBoundary.OPEN denotes an open interval,
i.e. less than (or greater than) comparison
IntervalConstraint.IntervalBoundary.CLOSE denotes a closed
interval, i.e. an equal to or less than (or equal to or greater than)
comparison |
Modifier and Type | Field and Description |
---|---|
private IntervalConstraint.IntervalBoundary |
highBoundary
Deprecated.
The interval boundary for the high constraint value.
|
private Number |
highConstraintValue
Deprecated.
The high constraint value (right interval boundary).
|
private IntervalConstraint.IntervalBoundary |
lowBoundary
Deprecated.
The interval boundary for the low constraint value.
|
private Number |
lowConstraintValue
Deprecated.
The low constraint value (left interval boundary).
|
Constructor and Description |
---|
IntervalConstraint(double lowConstraintValue,
IntervalConstraint.IntervalBoundary lowBoundary,
double highConstraintValue,
IntervalConstraint.IntervalBoundary highBoundary)
Deprecated.
Creates an IntervalConstraint parameter constraint.
|
IntervalConstraint(int lowConstraintValue,
IntervalConstraint.IntervalBoundary lowBoundary,
int highConstraintValue,
IntervalConstraint.IntervalBoundary highBoundary)
Deprecated.
Creates an IntervalConstraint parameter constraint.
|
IntervalConstraint(Number lowConstraintValue,
IntervalConstraint.IntervalBoundary lowBoundary,
Number highConstraintValue,
IntervalConstraint.IntervalBoundary highBoundary)
Deprecated.
Creates an IntervalConstraint parameter constraint.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription(String parameterName)
Deprecated.
Returns a description of this constraint.
|
void |
test(Number t)
Deprecated.
Checks if the number value given by the number parameter is greater equal
than the constraint value.
|
private final Number lowConstraintValue
private final IntervalConstraint.IntervalBoundary lowBoundary
IntervalConstraint.IntervalBoundary
private final Number highConstraintValue
private final IntervalConstraint.IntervalBoundary highBoundary
IntervalConstraint.IntervalBoundary
public IntervalConstraint(Number lowConstraintValue, IntervalConstraint.IntervalBoundary lowBoundary, Number highConstraintValue, IntervalConstraint.IntervalBoundary highBoundary)
lowConstraintValue
- the low constraint value (left interval boundary)lowBoundary
- the interval boundary for the low constraint value (see IntervalConstraint.IntervalBoundary
)highConstraintValue
- the high constraint value (right interval
boundary)highBoundary
- the interval boundary for the high constraint value
(see IntervalConstraint.IntervalBoundary
)public IntervalConstraint(int lowConstraintValue, IntervalConstraint.IntervalBoundary lowBoundary, int highConstraintValue, IntervalConstraint.IntervalBoundary highBoundary)
lowConstraintValue
- the low constraint value (left interval boundary)lowBoundary
- the interval boundary for the low constraint value (see IntervalConstraint.IntervalBoundary
)highConstraintValue
- the high constraint value (right interval
boundary)highBoundary
- the interval boundary for the high constraint value
(see IntervalConstraint.IntervalBoundary
)public IntervalConstraint(double lowConstraintValue, IntervalConstraint.IntervalBoundary lowBoundary, double highConstraintValue, IntervalConstraint.IntervalBoundary highBoundary)
lowConstraintValue
- the low constraint value (left interval boundary)lowBoundary
- the interval boundary for the low constraint value (see IntervalConstraint.IntervalBoundary
)highConstraintValue
- the high constraint value (right interval
boundary)highBoundary
- the interval boundary for the high constraint value
(see IntervalConstraint.IntervalBoundary
)public void test(Number t) throws ParameterException
test
in interface ParameterConstraint<Number>
t
- Value to be checked whether or not it fulfills the underlying
parameter constraint.ParameterException
- if the parameter to be tested does not
fulfill the parameter constraintpublic String getDescription(String parameterName)
ParameterConstraint
getDescription
in interface ParameterConstraint<Number>
parameterName
- the name of the parameter this constraint is used for