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.

@FunctionalInterface 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.
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(T value)
    Determines if the given value is valid.
  • Method Details

    • validate

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