-
- 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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ProblemHandlercollectingTo(Collection<Problem> collection)Creates a problem handler which will store problems into the specified collection.voidhandleProblems(List<Problem> problems)Handles the problems found while validating a JSON document.static ProblemHandlerthrowing()Creates a problem handler which will throw aJsonValidatingExceptionexception.
-
-
-
Method Detail
-
handleProblems
void handleProblems(List<Problem> problems)
Handles the problems found while validating a JSON document.- Parameters:
problems- the problems found, cannot benull.
-
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 specifiedcollectionisnull.
-
throwing
static ProblemHandler throwing()
Creates a problem handler which will throw aJsonValidatingExceptionexception.- Returns:
- newly created instance of problem handler.
- See Also:
JsonValidatingException
-
-