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.logging.AbstractLoggable
      extended by 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

Field Summary
private  NumberParameter<T> first
          First number parameter.
private  NumberParameter<T> second
          Second number parameter.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
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 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
 

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.
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()

Release 0.1 (2008-07-10_1838)