Class EvaluatorFactory.Builder

java.lang.Object
dev.harrel.jsonschema.EvaluatorFactory.Builder
Enclosing interface:
EvaluatorFactory

public static final class EvaluatorFactory.Builder extends Object
Builder for constructing EvaluatorFactory instances which is an alternative for providing a custom implementation. It is recommended when the Evaluator creation logic is simple and depends only on keyword name. To create factory which supports only "custom" and "type" keywords, you can write the following code:
     new EvaluatorFactory.Builder()
          .withKeyword("custom", CustomEvaluator::new)
          .withKeyword("type", CustomTypeEvaluator::new)
          .build();