Package org.datanucleus.properties
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 TypeMethodDescriptionboolean
Method to validate the property, allowing only Boolean or String(with boolean values).static boolean
validateValueIsBoolean
(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:
validate
in 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
-