Interface Validator<T>

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 Validator<T>
Interface for object validation (mostly to be used in tests).
Author:
Radovan Semancik
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(T object, String name)
    Validate the provided object.
  • Method Details

    • validate

      void validate(T object, String name) throws Exception
      Validate the provided object. Throws appropriate exception if the object is not valid.
      Parameters:
      object - object to validate
      name - short string name of the object. Designed to be used in exception messages.
      Throws:
      Exception - appropriate exception if the object is not valid.