Constructor and Description |
---|
DefaultBooleanHandler() |
Modifier and Type | Method and Description |
---|---|
Optional<Object> |
generate(JSONSchema schema,
ExplorationGenerator generator,
int maxDocumentDepth,
boolean generateInvalid,
ChoicesSequence choices)
Generates the value according to the schema.
|
protected Integer |
length(int minLength,
int maxLength,
ChoicesSequence choices)
Selects the next possible length between
minLength and
maxLength . |
public Optional<Object> generate(JSONSchema schema, ExplorationGenerator generator, int maxDocumentDepth, boolean generateInvalid, ChoicesSequence choices) throws JSONSchemaException, org.json.JSONException
IHandler
schema
- The JSON schemagenerator
- The generatormaxDocumentDepth
- The maximal depth (number of nested objects and
arrays) of the documentgenerateInvalid
- Whether the generator can produce invalid values
for the schemachoices
- The sequence of choicesJSONSchemaException
org.json.JSONException
protected Integer length(int minLength, int maxLength, ChoicesSequence choices)
minLength
and
maxLength
.minLength
- The minimum lengthmaxLength
- The maximum lengthchoices
- The sequence of choicesCopyright © 2022. All rights reserved.