Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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

public class OneMustBeSetGlobalConstraint
extends Object
implements GlobalParameterConstraint

Represents a global parameter constraint specifying that at least one parameter value of a given list of parameters (Parameter) has to be set.

Author:
Steffi Wanka

Field Summary
private  List<Parameter<?,?>> parameters
          List of parameters to be checked.
 
Constructor Summary
OneMustBeSetGlobalConstraint(List<Parameter<?,?>> params)
          Creates a One-Must-Be-Set global parameter constraint.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Checks if at least one parameter value of the list of parameters specified is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

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

Constructor Detail

OneMustBeSetGlobalConstraint

public OneMustBeSetGlobalConstraint(List<Parameter<?,?>> params)
Creates a One-Must-Be-Set global parameter constraint. That is, at least one parameter value of the given list of parameters has to be set.

Parameters:
params - list of parameters
Method Detail

test

public void test()
          throws ParameterException
Checks if at least one parameter value of the list of parameters specified is set. 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)