|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.validators.PatternValidator
org.exolab.castor.xml.validators.BooleanValidator
public class BooleanValidator
The Boolean Validation class. Handles validation for the primitive boolean and java.lang.Boolean types.
Constructor Summary | |
---|---|
BooleanValidator()
Creates a new BooleanValidator with no restrictions. |
Method Summary | |
---|---|
void |
clearFixed()
Clears the fixed value for this BooleanValidator. |
java.lang.Boolean |
getFixed()
Returns the fixed value that booleans validated with this validator must be equal to. |
boolean |
hasFixed()
Returns true if a fixed value to validate against has been set. |
void |
setFixed(boolean fixedValue)
Sets the fixed value for boolean validation. |
void |
setFixed(java.lang.Boolean fixedValue)
Sets the fixed value for boolean validation. |
void |
validate(boolean b,
ValidationContext context)
Validates the given Object. |
void |
validate(java.lang.Object object)
Validates the given Object. |
void |
validate(java.lang.Object object,
ValidationContext context)
Validates the given Object. |
Methods inherited from class org.exolab.castor.xml.validators.PatternValidator |
---|
addPattern, clearPatterns, getPatterns, hasPattern, isNillable, setNillable, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BooleanValidator()
Method Detail |
---|
public void clearFixed()
public java.lang.Boolean getFixed()
public boolean hasFixed()
public void setFixed(boolean fixedValue)
fixedValue
- the fixed value that a boolean validated with this validator
must be equal to.public void setFixed(java.lang.Boolean fixedValue)
fixedValue
- the fixed value that a boolean validated with this validator
must be equal to.public void validate(boolean b, ValidationContext context) throws ValidationException
b
- the boolean to validatecontext
- the ValidationContext
ValidationException
- if the object fails validation.public void validate(java.lang.Object object) throws ValidationException
object
- the Object to validate
ValidationException
- if the object fails validation.public void validate(java.lang.Object object, ValidationContext context) throws ValidationException
validate
in interface TypeValidator
validate
in class PatternValidator
object
- the Object to validatecontext
- the ValidationContext
ValidationException
- if the object fails validation.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |