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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.NoDuplicateValueGlobalConstraint
All Implemented Interfaces:
GlobalParameterConstraint

public class NoDuplicateValueGlobalConstraint
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.


Field Summary
private  List<? extends Parameter<?,?>> parameters
          List of number parameters to be checked.
 
Constructor Summary
NoDuplicateValueGlobalConstraint(List<? extends Parameter<?,?>> parameters)
          Constructs a Not-Equal-Value global parameter constraint.
NoDuplicateValueGlobalConstraint(Parameter<?,?>... 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<? extends Parameter<?,?>> parameters
List of number parameters to be checked.

Constructor Detail

NoDuplicateValueGlobalConstraint

public NoDuplicateValueGlobalConstraint(List<? extends Parameter<?,?>> 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

NoDuplicateValueGlobalConstraint

public NoDuplicateValueGlobalConstraint(Parameter<?,?>... 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.4.0 (2011-09-20_1324)