de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints
Class EqualSizeGlobalConstraint

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.EqualSizeGlobalConstraint
All Implemented Interfaces:
GlobalParameterConstraint

public class EqualSizeGlobalConstraint
extends Object
implements GlobalParameterConstraint

Global parameter constraint defining that a number of list parameters ( ListParameter ) must have equal list sizes.


Field Summary
private  List<ListParameter<?>> parameters
          List parameters to be tested
 
Constructor Summary
EqualSizeGlobalConstraint(List<ListParameter<?>> params)
          Creates a global parameter constraint for testing if a number of list parameters have equal list sizes.
 
Method Summary
 String getDescription()
          Returns a description of this global constraint.
 void test()
          Checks if the list parameters have equal list sizes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

private List<ListParameter<?>> parameters
List parameters to be tested

Constructor Detail

EqualSizeGlobalConstraint

public EqualSizeGlobalConstraint(List<ListParameter<?>> params)
Creates a global parameter constraint for testing if a number of list parameters have equal list sizes.

Parameters:
params - list parameters to be tested for equal list sizes
Method Detail

test

public void test()
          throws ParameterException
Checks if the list parameters have equal list sizes. 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

Release 0.4.0 (2011-09-20_1324)