|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.IntervalConstraint
public class IntervalConstraint
Represents an interval parameter constraint testing if a given value lies
within the specified interval. The value of the number parameter (
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.
Nested Class Summary | |
---|---|
static class |
IntervalConstraint.IntervalBoundary
Available interval boundary types types: IntervalConstraint.IntervalBoundary.OPEN denotes an opend 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 |
Field Summary | |
---|---|
private IntervalConstraint.IntervalBoundary |
highBoundary
The interval boundary for the high constraint value (@see IntervalBoundary) |
private Number |
highConstraintValue
The high constraint value (right interval boundary). |
private IntervalConstraint.IntervalBoundary |
lowBoundary
The interval boundary for the low constraint value (@see IntervalBoundary) |
private Number |
lowConstraintValue
The low constraint value (left interval boundary). |
Constructor Summary | |
---|---|
IntervalConstraint(Number lowConstraintValue,
IntervalConstraint.IntervalBoundary lowBoundary,
Number highConstraintValue,
IntervalConstraint.IntervalBoundary highBoundary)
Creates an IntervalConstraint parameter constraint. |
Method Summary | |
---|---|
String |
getDescription(String parameterName)
Returns a description of this constraint. |
void |
test(Number t)
Checks if the number value given by the number parameter is greater equal than the constraint value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Number lowConstraintValue
private final IntervalConstraint.IntervalBoundary lowBoundary
private final Number highConstraintValue
private final IntervalConstraint.IntervalBoundary highBoundary
Constructor Detail |
---|
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
IntervalBoundary)highConstraintValue
- the high constraint value (right interval
boundary)highBoundary
- the interval boundary for the high constraint value
(@see IntervalBoundary)Method Detail |
---|
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
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |