public class SubsetValidation extends Object implements Validation
Constructor and Description |
---|
SubsetValidation(boolean validSize,
Validation constraintValidation)
Create a subset validation.
|
Modifier and Type | Method and Description |
---|---|
Validation |
getConstraintValidation()
Get the validation object produced when checking the general mandatory constraints (may be
null ). |
boolean |
passed()
Check whether the subset solution passed validation, taking into account both
its size and the general mandatory constraint validations (if not
null ). |
boolean |
passed(boolean checkSize)
Check whether the subset solution passed validation.
|
String |
toString()
Get a string representation of the validation object.
|
boolean |
validSize()
Check whether the subset solution has a valid size.
|
public SubsetValidation(boolean validSize, Validation constraintValidation)
validSize
- indicates whether the subset has a valid sizeconstraintValidation
- validation object produced when checking the general mandatory constraints
(may be null
)public boolean validSize()
true
if the subset has a valid sizepublic Validation getConstraintValidation()
null
).public boolean passed(boolean checkSize)
checkSize
is false
the size of the subset is ignored and only the general
mandatory constraints are checked (if not null
).checkSize
- indicates whether the size should be validatedtrue
if the subset solution is valid, possibly ignoring its sizepublic boolean passed()
null
).passed
in interface Validation
true
if the subset has a valid size and satisfies all mandatory constraints (if any)Copyright © 2016. All rights reserved.