de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class LessGlobalConstraint<T extends Number>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.LessGlobalConstraint<T>
Type Parameters:
T - Number type
All Implemented Interfaces:
GlobalParameterConstraint

public class LessGlobalConstraint<T extends Number>
extends Object
implements GlobalParameterConstraint

Represents a Less-Than global parameter constraint. The value of the first number parameter (NumberParameter) given has to be less than the value of the second number parameter (NumberParameter) given.


Field Summary
private  NumberParameter<T> first
          First number parameter.
private  NumberParameter<T> second
          Second number parameter.
 
Constructor Summary
LessGlobalConstraint(NumberParameter<T> first, NumberParameter<T> second)
          Creates a Less-Than global parameter constraint.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Checks if the value of the first number parameter is less than the value of the second number parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

private NumberParameter<T extends Number> first
First number parameter.


second

private NumberParameter<T extends Number> second
Second number parameter.

Constructor Detail

LessGlobalConstraint

public LessGlobalConstraint(NumberParameter<T> first,
                            NumberParameter<T> second)
Creates a Less-Than global parameter constraint. That is the value of the first number parameter given has to be less than the value of the second number parameter given.

Parameters:
first - first number parameter
second - second number parameter
Method Detail

test

public void test()
          throws ParameterException
Checks if the value of the first number parameter is less 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.

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

Release 0.4.0 (2011-09-20_1324)