Class NumberSchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.NumberSchema
-
- Direct Known Subclasses:
IntegerSchema
public class NumberSchema extends ValueTypeSchema
This class represents aJsonSchemaas a number type
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.BooleanexclusiveMaximumThis 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 java.lang.BooleanexclusiveMinimumThis 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 java.lang.DoublemaximumThis attribute defines the maximum value of the instance propertyprivate java.lang.DoubleminimumThis attribute defines the minimum value of the instance propertyprivate java.lang.DoublemultipleOfThe value of the instance needs to be a multiple of this attribute-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
enums, format
-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
defaultdefault, links, pathStart, title
-
-
Constructor Summary
Constructors Constructor Description NumberSchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean_equals(NumberSchema that)NumberSchemaasNumberSchema()Attempt to return this JsonSchema as aNumberSchemabooleanequals(java.lang.Object obj)java.lang.BooleangetExclusiveMaximum()java.lang.BooleangetExclusiveMinimum()java.lang.DoublegetMaximum()java.lang.DoublegetMinimum()java.lang.DoublegetMultipleOf()com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypesgetType()booleanisNumberSchema()determine if this JsonSchema is anNumberSchema.voidsetExclusiveMaximum(java.lang.Boolean exclusiveMaximum)voidsetExclusiveMinimum(java.lang.Boolean exclusiveMinimum)voidsetMaximum(java.lang.Double maximum)voidsetMinimum(java.lang.Double minimum)voidsetMultipleOf(java.lang.Double multipleOf)-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
_equals, asValueSchemaSchema, asValueTypeSchema, getEnums, getFormat, isValueTypeSchema, setEnums, setFormat
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitle
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.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 Detail
-
exclusiveMaximum
private java.lang.Boolean 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
private java.lang.Boolean 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
private java.lang.Double maximum
This attribute defines the maximum value of the instance property
-
minimum
private java.lang.Double minimum
This attribute defines the minimum value of the instance property
-
multipleOf
private java.lang.Double multipleOf
The value of the instance needs to be a multiple of this attribute
-
-
Method Detail
-
asNumberSchema
public NumberSchema 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
public java.lang.Boolean getExclusiveMaximum()
-
getExclusiveMinimum
public java.lang.Boolean getExclusiveMinimum()
-
getMaximum
public java.lang.Double getMaximum()
-
getMinimum
public java.lang.Double getMinimum()
-
getMultipleOf
public java.lang.Double 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
public void setExclusiveMaximum(java.lang.Boolean exclusiveMaximum)
-
setExclusiveMinimum
public void setExclusiveMinimum(java.lang.Boolean exclusiveMinimum)
-
setMaximum
public void setMaximum(java.lang.Double maximum)
-
setMinimum
public void setMinimum(java.lang.Double minimum)
-
setMultipleOf
public void setMultipleOf(java.lang.Double multipleOf)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classValueTypeSchema
-
_equals
protected boolean _equals(NumberSchema that)
-
-