Class NumberSchema
java.lang.Object
com.fasterxml.jackson.module.jsonSchema.JsonSchema
com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
com.fasterxml.jackson.module.jsonSchema.types.ValueTypeSchema
com.fasterxml.jackson.module.jsonSchema.types.NumberSchema
- Direct Known Subclasses:
IntegerSchema
This class represents a
JsonSchema as a number type-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BooleanThis attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute.private BooleanThis attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute.private DoubleThis attribute defines the maximum value of the instance propertyprivate DoubleThis attribute defines the minimum value of the instance propertyprivate DoubleThe value of the instance needs to be a multiple of this attributeFields inherited from class ValueTypeSchema
enums, formatFields inherited from class SimpleTypeSchema
defaultdefault, links, pathStart, title -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_equals(NumberSchema that) Attempt to return this JsonSchema as aNumberSchemabooleancom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypesgetType()booleandetermine if this JsonSchema is anNumberSchema.voidsetExclusiveMaximum(Boolean exclusiveMaximum) voidsetExclusiveMinimum(Boolean exclusiveMinimum) voidsetMaximum(Double maximum) voidsetMinimum(Double minimum) voidsetMultipleOf(Double multipleOf) Methods inherited from class ValueTypeSchema
_equals, asValueSchemaSchema, asValueTypeSchema, getEnums, getFormat, isValueTypeSchema, setEnums, setFormatMethods inherited from class SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitleMethods inherited from class JsonSchema
_equals, arraysEqual, asAnySchema, asArraySchema, asBooleanSchema, asContainerSchema, asContainerTypeSchema, asIntegerSchema, asNullSchema, asObjectSchema, asStringSchema, asUnionTypeSchema, enrichWithBeanProperty, equals, get$ref, get$schema, getDescription, getDisallow, getExtends, getId, getReadonly, getRequired, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isObjectSchema, isStringSchema, isUnionTypeSchema, minimalForFormat, set$ref, set$schema, setDescription, setDisallow, setExtends, setId, setReadonly, setRequired
-
Field Details
-
exclusiveMaximum
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. -
exclusiveMinimum
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. -
maximum
This attribute defines the maximum value of the instance property -
minimum
This attribute defines the minimum value of the instance property -
multipleOf
The value of the instance needs to be a multiple of this attribute
-
-
Constructor Details
-
NumberSchema
public NumberSchema()
-
-
Method Details
-
asNumberSchema
Description copied from class:JsonSchemaAttempt to return this JsonSchema as aNumberSchema- Overrides:
asNumberSchemain classJsonSchema- Returns:
- this as a NumberSchema if possible, or null otherwise
-
getExclusiveMaximum
-
getExclusiveMinimum
-
getMaximum
-
getMinimum
-
getMultipleOf
-
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()- Specified by:
getTypein classJsonSchema
-
isNumberSchema
public boolean isNumberSchema()Description copied from class:JsonSchemadetermine if this JsonSchema is anNumberSchema.- Overrides:
isNumberSchemain classJsonSchema- Returns:
- true if this JsonSchema is an NumberSchema, false otherwise
-
setExclusiveMaximum
-
setExclusiveMinimum
-
setMaximum
-
setMinimum
-
setMultipleOf
-
equals
- Overrides:
equalsin classValueTypeSchema
-
_equals
-