Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class GreaterConstraint

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.AbstractNumberConstraint<Number>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.GreaterConstraint
All Implemented Interfaces:
Loggable, ParameterConstraint<Number>

public class GreaterConstraint
extends AbstractNumberConstraint<Number>

Represents a parameter constraint for testing if the value of the number parameter (NumberParameter) tested is greater than the specified constraint value.

Author:
Steffi Wanka

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.AbstractNumberConstraint
constraintValue
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
GreaterConstraint(Number constraintValue)
          Creates a Greater-Than-Number 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 than the constraint value.
 
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
 
Methods inherited from interface de.lmu.ifi.dbs.elki.logging.Loggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, verbose, verbose, warning
 

Constructor Detail

GreaterConstraint

public GreaterConstraint(Number constraintValue)
Creates a Greater-Than-Number parameter constraint.

That is, the value of the number parameter has to be greater than the given constraint value.

Parameters:
constraintValue - the constraint value
Method Detail

test

public void test(Number t)
          throws ParameterException
Checks if the number value given by the number parameter is greater than the constraint value. If not, a parameter exception is thrown.

Parameters:
t - Value to be checked whether or not it fulfills the underlying parameter constraint.
Throws:
ParameterException - if the parameter to be tested does not fulfill the parameter constraint
See Also:
ParameterConstraint.test(java.lang.Object)

getDescription

public String getDescription(String parameterName)
Description copied from interface: ParameterConstraint
Returns a description of this constraint.

Parameters:
parameterName - the name of the parameter this constraint is used for
Returns:
a description of this constraint
See Also:
ParameterConstraint.getDescription(String)

Release 0.1 (2008-07-10_1838)