public class ComponentValidator<T extends Component> extends Object implements Validator<T>
| Constructor and Description |
|---|
ComponentValidator(ValidationRule... rules) |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertNone(String componentName,
ComponentList<?> components) |
static void |
assertOneOrLess(String componentName,
ComponentList<?> components) |
void |
validate(T target)
Validates the associated model against an applicable standard.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassertFalsepublic ComponentValidator(ValidationRule... rules)
public void validate(T target) throws ValidationException
Validatorvalidate in interface Validator<T extends Component>ValidationException - where the model does not confirm to the applicable standardpublic static void assertNone(String componentName, ComponentList<?> components) throws ValidationException
componentName - a component name used in the assertioncomponents - a list of componentsValidationException - where the assertion failspublic static void assertOneOrLess(String componentName, ComponentList<?> components) throws ValidationException
componentName - a component name used in the assertioncomponents - a list of componentsValidationException - where the assertion fails