Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class NotEqualValueGlobalConstraint<N extends Number>

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

public class NotEqualValueGlobalConstraint<N extends Number>
extends Object
implements GlobalParameterConstraint

Global parameter constraint specifying that parameters of a list of number parameters (NumberParameter) are not allowed to have the same value.

Author:
Steffi Wanka

Field Summary
private  List<NumberParameter<N>> parameters
          List of number parameters to be checked.
 
Constructor Summary
NotEqualValueGlobalConstraint(List<NumberParameter<N>> parameters)
          Constructs a Not-Equal-Value global parameter constraint.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Checks if the elements of the list of number parameters do have different values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

private List<NumberParameter<N extends Number>> parameters
List of number parameters to be checked.

Constructor Detail

NotEqualValueGlobalConstraint

public NotEqualValueGlobalConstraint(List<NumberParameter<N>> parameters)
Constructs a Not-Equal-Value global parameter constraint. That is, the elements of a list of number parameters are not allowed to have equal values.

Parameters:
parameters - list of number parameters to be tested
Method Detail

test

public void test()
          throws ParameterException
Checks if the elements of the list of number parameters do have different values. 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)