Interface IValidator<T>

  • Type Parameters:
    T - type of object being validated
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface IValidator<T>
    A validator. This validator is responsible for determining if a given value is valid. Validators can be used on target or model values. For example, a String2IntValidator would only accept source Strings that can successfully be converted to an integer value, and a PositiveIntegerValidator would only accept positive integers.
    • Method Detail

      • validate

        IStatus validate​(T value)
        Determines if the given value is valid.
        value - the value to validate
        a status object indicating whether the validation succeeded IStatus.isOK() or not. Never null.