net.fortuna.ical4j.util
public final class PropertyValidator extends Object
Modifier and Type | Method and Description |
---|---|
void |
assertNone(String propertyName,
PropertyList properties)
Ensure a property doesn't occur in the specified list.
|
void |
assertOne(String propertyName,
PropertyList properties)
Ensure a property occurs once.
|
void |
assertOneOrLess(String propertyName,
PropertyList properties)
Ensure a property occurs no more than once.
|
void |
assertOneOrMore(String propertyName,
PropertyList properties)
Ensure a property occurs at least once.
|
static PropertyValidator |
getInstance() |
public void assertOneOrLess(String propertyName, PropertyList properties) throws ValidationException
propertyName
- the property nameproperties
- a list of properties to queryValidationException
- when the specified property occurs more than oncepublic void assertOneOrMore(String propertyName, PropertyList properties) throws ValidationException
propertyName
- the property nameproperties
- a list of properties to queryValidationException
- when the specified property occurs more than oncepublic void assertOne(String propertyName, PropertyList properties) throws ValidationException
propertyName
- the property nameproperties
- a list of properties to queryValidationException
- when the specified property does not occur oncepublic void assertNone(String propertyName, PropertyList properties) throws ValidationException
propertyName
- the name of a propertyproperties
- a list of propertiesValidationException
- thrown when the specified property
is found in the list of propertiespublic static PropertyValidator getInstance()
Copyright © 2004-2013 Micronode. All Rights Reserved.