de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class LessEqualGlobalConstraint<T extends Number>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.LessEqualGlobalConstraint<T>
- All Implemented Interfaces:
- Loggable, GlobalParameterConstraint
public class LessEqualGlobalConstraint<T extends Number>
- extends AbstractLoggable
- implements GlobalParameterConstraint
Represents a Less-Equal-Than global parameter constraint. The value of the
first number parameter (NumberParameter
) has to be less equal than the value of the second
number parameter (NumberParameter
).
- Author:
- Steffi Wanka
Method Summary |
String |
getDescription()
Returns a description of this global constraint. |
void |
test()
Checks if the value of the first number parameter is less equal than the
value of the second number parameter. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
first
private NumberParameter<T extends Number> first
- First number parameter.
second
private NumberParameter<T extends Number> second
- Second number parameter.
LessEqualGlobalConstraint
public LessEqualGlobalConstraint(NumberParameter<T> first,
NumberParameter<T> second)
- Creates a Less-Equal-Than global parameter constraint.
That is, the value of
the first number parameter given has to be less equal than the value of
the second number parameter given.
- Parameters:
first
- first number parametersecond
- second number parameter
test
public void test()
throws ParameterException
- Checks if the value of the first number parameter is less equal than the
value of the second number parameter. If not, a parameter exception is
thrown.
- Specified by:
test
in interface GlobalParameterConstraint
- Throws:
ParameterException
- if the parameters don't satisfy the parameter constraint.- See Also:
GlobalParameterConstraint.test()
getDescription
public String getDescription()
- Description copied from interface:
GlobalParameterConstraint
- Returns a description of this global constraint.
- Specified by:
getDescription
in interface GlobalParameterConstraint
- Returns:
- a description of this global constraint
- See Also:
GlobalParameterConstraint.getDescription()