Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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

public class AllOrNoneMustBeSetGlobalConstraint
extends Object
implements GlobalParameterConstraint

Global parameter constraint specifying that either all elements of a list of parameters (Parameter) must be set, or none of them.

Author:
Steffi Wanka

Field Summary
private  List<Parameter<?,?>> parameterList
          List of parameters to be checked
 
Constructor Summary
AllOrNoneMustBeSetGlobalConstraint(List<Parameter<?,?>> parameters)
          Constructs a global parameter constraint for testing if either all elements of a list of parameters are set or none of them.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Checks if either all elements of a list of parameters are set, or none of them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameterList

private List<Parameter<?,?>> parameterList
List of parameters to be checked

Constructor Detail

AllOrNoneMustBeSetGlobalConstraint

public AllOrNoneMustBeSetGlobalConstraint(List<Parameter<?,?>> parameters)
Constructs a global parameter constraint for testing if either all elements of a list of parameters are set or none of them.

Parameters:
parameters - list of parameters to be checked
Method Detail

test

public void test()
          throws ParameterException
Checks if either all elements of a list of parameters are set, or none of them. 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.2 (2009-07-06_1820)