Class MinimumHelper
- java.lang.Object
-
- org.forgerock.json.schema.validator.helpers.MinimumHelper
-
- All Implemented Interfaces:
SimpleValidator<Number>
public class MinimumHelper extends Object implements SimpleValidator<Number>
Helper compares twoNumber
s to check the minimum constraint.- See Also:
- minimum
-
-
Constructor Summary
Constructors Constructor Description MinimumHelper(Number minimum, boolean exclusiveMinimum)
Create a minimum helper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(Number node, JsonPointer at, ErrorHandler handler)
Validates thenode
value against the embedded schema object.
-
-
-
Constructor Detail
-
MinimumHelper
public MinimumHelper(Number minimum, boolean exclusiveMinimum)
Create a minimum helper.- Parameters:
minimum
- The minimum.exclusiveMinimum
- Whether it is an exclusive minimum.
-
-
Method Detail
-
validate
public void validate(Number node, JsonPointer at, ErrorHandler handler) throws SchemaException
Description copied from interface:SimpleValidator
Validates thenode
value against the embedded schema object.The selected error handler defines the behaviour of the validator. The
FailFastErrorHandler
throws exception at firs violation. Other customisedErrorHandler
can collect all exceptions and after the validation the examination of thehandler
contains the final result.- Specified by:
validate
in interfaceSimpleValidator<Number>
- Parameters:
node
- value to validateat
- JSONPath of the node. null means it's the root nodehandler
- customised error handler likeFailFastErrorHandler
- Throws:
SchemaException
- when thenode
violates with the schema
-
-