public class ListEachConstraint extends Object implements ParameterConstraint<int[]>
Modifier and Type | Field and Description |
---|---|
private List<ParameterConstraint<? super Integer>> |
constraints
Constraints
|
Constructor and Description |
---|
ListEachConstraint()
Constructor.
|
ListEachConstraint(ParameterConstraint<? super Integer> constraint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConstraint(ParameterConstraint<? super Integer> constraint)
Add a constraint to this operator.
|
String |
getDescription(String parameterName)
Returns a description of this constraint.
|
void |
test(int[] t)
Checks if the value
t of the parameter to be tested fulfills the parameter constraint. |
private List<ParameterConstraint<? super Integer>> constraints
public ListEachConstraint()
public ListEachConstraint(ParameterConstraint<? super Integer> constraint)
constraint
- Constraint to apply to all elementspublic void addConstraint(ParameterConstraint<? super Integer> constraint)
constraint
- Constraintpublic void test(int[] t) throws ParameterException
ParameterConstraint
t
of the parameter to be tested fulfills the parameter constraint.
If not, a parameter exception is thrown.test
in interface ParameterConstraint<int[]>
t
- Value to be checked whether or not it fulfills the underlying
parameter constraint.ParameterException
- if the parameter to be tested does not
fulfill the parameter constraintpublic String getDescription(String parameterName)
ParameterConstraint
getDescription
in interface ParameterConstraint<int[]>
parameterName
- the name of the parameter this constraint is used forCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.