de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class NotEqualValueGlobalConstraint<N extends Number>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.NotEqualValueGlobalConstraint<N>
- Type Parameters:
N
- Number type
- All Implemented Interfaces:
- GlobalParameterConstraint
public class NotEqualValueGlobalConstraint<N extends Number>
- extends Object
- implements GlobalParameterConstraint
Global parameter constraint specifying that parameters of a list of number
parameters (NumberParameter
) are not allowed to have the same value.
- Author:
- Steffi Wanka
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parameters
private List<NumberParameter<N extends Number>> parameters
- List of number parameters to be checked.
NotEqualValueGlobalConstraint
public NotEqualValueGlobalConstraint(List<NumberParameter<N>> parameters)
- Constructs a Not-Equal-Value global parameter constraint. That is, the
elements of a list of number parameters are not allowed to have equal
values.
- Parameters:
parameters
- list of number parameters to be tested
test
public void test()
throws ParameterException
- Checks if the elements of the list of number parameters do have different
values. 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