Interface Validator<T>

    • Method Detail

      • validate

        boolean validate​(T obj)
        Validates the given object.
        Parameters:
        obj - an object of type T to validate.
        Returns:
        true if the provided object is valid.
      • validateWithValidationResult

        default uk.gov.gchq.koryphe.ValidationResult validateWithValidationResult​(T obj)

        Validates the given object and results a ValidationResult that can contain information as to why validation fails.

        It is less efficient than just calling validate as complex validation strings may be built to detail why objects are invalid.

        Parameters:
        obj - an object of type T to validate.
        Returns:
        the ValidationResult.