Class BooleanPropertyValidator

    • Constructor Detail

      • BooleanPropertyValidator

        public BooleanPropertyValidator()
    • 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 interface PropertyValidator
        Parameters:
        name - Name of property
        value - 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