public class NoDuplicateValueGlobalConstraint extends Object implements GlobalParameterConstraint
NumberParameter
) are not allowed to have the same value.Modifier and Type | Field and Description |
---|---|
private List<? extends AbstractParameter<?,?>> |
parameters
List of number parameters to be checked.
|
Constructor and Description |
---|
NoDuplicateValueGlobalConstraint(AbstractParameter<?,?>... parameters)
Constructs a Not-Equal-Value global parameter constraint.
|
NoDuplicateValueGlobalConstraint(List<? extends AbstractParameter<?,?>> parameters)
Constructs a Not-Equal-Value global parameter constraint.
|
Modifier and Type | Method and Description |
---|---|
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.
|
private List<? extends AbstractParameter<?,?>> parameters
public NoDuplicateValueGlobalConstraint(List<? extends AbstractParameter<?,?>> parameters)
parameters
- list of number parameters to be testedpublic NoDuplicateValueGlobalConstraint(AbstractParameter<?,?>... parameters)
parameters
- list of number parameters to be testedpublic void test() throws ParameterException
test
in interface GlobalParameterConstraint
ParameterException
- if the parameters don't satisfy the parameter constraint.public String getDescription()
GlobalParameterConstraint
getDescription
in interface GlobalParameterConstraint