
public class OnlyOneIsAllowedToBeSetGlobalConstraint extends Object implements GlobalParameterConstraint
Parameter) is allowed to be set.| Modifier and Type | Field and Description |
|---|---|
private List<Parameter<?>> |
parameters
List of parameters to be checked.
|
| Constructor and Description |
|---|
OnlyOneIsAllowedToBeSetGlobalConstraint(List<Parameter<?>> params)
Constructs a global parameter constraint for testing if only one parameter
of a list of parameters is set.
|
OnlyOneIsAllowedToBeSetGlobalConstraint(Parameter<?>... params)
Constructs a global parameter constraint for testing if only one parameter
of a list of parameters is set.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns a description of this global constraint.
|
void |
test()
Checks if only one parameter of a list of parameters is set.
|
public OnlyOneIsAllowedToBeSetGlobalConstraint(List<Parameter<?>> params)
params - list of parameters to be checkedpublic OnlyOneIsAllowedToBeSetGlobalConstraint(Parameter<?>... params)
params - list of parameters to be checkedpublic void test()
throws ParameterException
test in interface GlobalParameterConstraintParameterException - if the parameters don't satisfy the parameter constraint.public String getDescription()
GlobalParameterConstraintgetDescription in interface GlobalParameterConstraint