Module de.carne

Interface Validation<I>

  • Type Parameters:
    I - the actual input type.
    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 Validation<I>
    Functional interface used to define input validation steps.
    • Method Detail

      • check

        boolean check​(I input)
               throws java.lang.Exception
        Checks whether the given input is valid.
        Parameters:
        input - the input value to check.
        Returns:
        true if the input valid, false otherwise.
        Throws:
        java.lang.Exception - if the validation fails.