Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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

public class LessEqualGlobalConstraint<T extends Number>
extends Object
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

Field Summary
private  NumberParameter<T> first
          First number parameter.
private  NumberParameter<T> second
          Second number parameter.
 
Constructor Summary
LessEqualGlobalConstraint(NumberParameter<T> first, NumberParameter<T> second)
          Creates a Less-Equal-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 equal 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

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 parameter
second - second number parameter
Method Detail

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.

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.3 (2010-03-31_1612)