public final class PropertyValidator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
assertNone(java.lang.String propertyName,
PropertyList properties)
Ensure a property doesn't occur in the specified list.
|
void |
assertOne(java.lang.String propertyName,
PropertyList properties)
Ensure a property occurs once.
|
void |
assertOneOrLess(java.lang.String propertyName,
PropertyList properties)
Ensure a property occurs no more than once.
|
void |
assertOneOrMore(java.lang.String propertyName,
PropertyList properties)
Ensure a property occurs at least once.
|
static PropertyValidator |
getInstance() |
public void assertOneOrLess(java.lang.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(java.lang.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(java.lang.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(java.lang.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()