Package org.datanucleus.properties
Class BooleanPropertyValidator
- java.lang.Object
-
- org.datanucleus.properties.BooleanPropertyValidator
-
- All Implemented Interfaces:
PropertyValidator
public class BooleanPropertyValidator extends Object implements PropertyValidator
Validator for a property that represents a boolean.
-
-
Constructor Summary
Constructors Constructor Description BooleanPropertyValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
validate(String name, Object value)
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.
-
-
-
Method Detail
-
validate
public boolean validate(String name, Object value)
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
public static boolean validateValueIsBoolean(Object value)
Convenience method that checks that the passed value is usable as a boolean.- Parameters:
value
- The value- Returns:
- Whether it is boolean
-
-