Class BooleanPropertyValidator
java.lang.Object
org.datanucleus.properties.BooleanPropertyValidator
- All Implemented Interfaces:
PropertyValidator
Validator for a property that represents a boolean.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod to validate the property, allowing only Boolean or String(with boolean values).static booleanvalidateValueIsBoolean(Object value) Convenience method that checks that the passed value is usable as a boolean.
-
Constructor Details
-
BooleanPropertyValidator
public BooleanPropertyValidator()
-
-
Method Details
-
validate
Method to validate the property, allowing only Boolean or String(with boolean values).- Specified by:
validatein interfacePropertyValidator- Parameters:
name- Name of propertyvalue- Value of property- Returns:
- Whether it is valid
-
validateValueIsBoolean
Convenience method that checks that the passed value is usable as a boolean.- Parameters:
value- The value- Returns:
- Whether it is boolean
-