Package net.fortuna.ical4j.validate
Class ComponentValidator<T extends Component>
- java.lang.Object
-
- net.fortuna.ical4j.validate.ComponentValidator<T>
-
- All Implemented Interfaces:
Serializable
,Validator<T>
- Direct Known Subclasses:
VEventValidator
,VTimeZoneValidator
,VToDoValidator
public class ComponentValidator<T extends Component> extends Object implements Validator<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComponentValidator(ValidationRule... rules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ComponentValidator
public ComponentValidator(ValidationRule... rules)
-
-
Method Detail
-
validate
public void validate(T target) throws ValidationException
Description copied from interface:Validator
Validates the associated model against an applicable standard.- Specified by:
validate
in interfaceValidator<T extends Component>
- Throws:
ValidationException
- where the model does not confirm to the applicable standard
-
assertNone
public static void assertNone(String componentName, ComponentList<?> components) throws ValidationException
- Parameters:
componentName
- a component name used in the assertioncomponents
- a list of components- Throws:
ValidationException
- where the assertion fails
-
assertOneOrLess
public static void assertOneOrLess(String componentName, ComponentList<?> components) throws ValidationException
- Parameters:
componentName
- a component name used in the assertioncomponents
- a list of components- Throws:
ValidationException
- where the assertion fails
-
-