de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class OneMustBeSetGlobalConstraint
java.lang.Object
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.
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 |
parameters
private List<Parameter<?,?>> parameters
- List of parameters to be checked.
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
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