public class GlobalListSizeConstraint extends Object implements GlobalParameterConstraint
ListParameter
) given is equal to the constraint size
specified by the integer parameter (IntParameter
) given.Modifier and Type | Field and Description |
---|---|
private IntParameter |
length
Integer parameter specifying the constraint list size.
|
private ListParameter<?> |
list
List parameter to be tested.
|
Constructor and Description |
---|
GlobalListSizeConstraint(ListParameter<?> v,
IntParameter i)
Creates a List-Size global parameter constraint.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a description of this global constraint.
|
void |
test()
Checks is the size of the list parameter is equal to the constraint list
size specified.
|
private ListParameter<?> list
private IntParameter length
public GlobalListSizeConstraint(ListParameter<?> v, IntParameter i)
v
- the list parameter to be tested.i
- integer parameter specifying the constraint list size.public 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