public class ListEachNumberConstraint<T> extends java.lang.Object implements ParameterConstraint<T>
Modifier and Type | Field and Description |
---|---|
private java.util.List<AbstractNumberConstraint> |
constraints
Constraints
|
Constructor and Description |
---|
ListEachNumberConstraint()
Constructor.
|
ListEachNumberConstraint(AbstractNumberConstraint constraint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConstraint(AbstractNumberConstraint constraint)
Add a constraint to this operator.
|
java.lang.String |
getDescription(java.lang.String parameterName)
Returns a description of this constraint.
|
void |
test(T t)
Checks if the value
t of the parameter to be tested fulfills the
parameter constraint. |
private java.util.List<AbstractNumberConstraint> constraints
public ListEachNumberConstraint()
public ListEachNumberConstraint(AbstractNumberConstraint constraint)
constraint
- Constraint to apply to all elementspublic void addConstraint(AbstractNumberConstraint constraint)
constraint
- Constraintpublic void test(T 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<T>
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 java.lang.String getDescription(java.lang.String parameterName)
ParameterConstraint
getDescription
in interface ParameterConstraint<T>
parameterName
- the name of the parameter this constraint is used forCopyright © 2019 ELKI Development Team. License information.