Interface ProblemHandler

  • 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 ProblemHandler
    A handler interface for handling the problems found while validating a JSON document.
    Author:
    leadpony
    • Method Detail

      • handleProblems

        void handleProblems​(List<Problem> problems)
        Handles the problems found while validating a JSON document.
        Parameters:
        problems - the problems found, cannot be null.
      • collectingTo

        static ProblemHandler collectingTo​(Collection<Problem> collection)
        Creates a problem handler which will store problems into the specified collection.
        Parameters:
        collection - the collection into which problems will be stored.
        Returns:
        newly created instance of problem handler.
        Throws:
        NullPointerException - if the specified collection is null.