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 aJsonSchema
as a number type
-
-
Field Summary
Fields Modifier and Type Field Description 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.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.private java.lang.Double
maximum
This attribute defines the maximum value of the instance propertyprivate java.lang.Double
minimum
This attribute defines the minimum value of the instance propertyprivate java.lang.Double
multipleOf
The 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)
NumberSchema
asNumberSchema()
Attempt to return this JsonSchema as aNumberSchema
boolean
equals(java.lang.Object obj)
java.lang.Boolean
getExclusiveMaximum()
java.lang.Boolean
getExclusiveMinimum()
java.lang.Double
getMaximum()
java.lang.Double
getMinimum()
java.lang.Double
getMultipleOf()
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes
getType()
boolean
isNumberSchema()
determine if this JsonSchema is anNumberSchema
.void
setExclusiveMaximum(java.lang.Boolean exclusiveMaximum)
void
setExclusiveMinimum(java.lang.Boolean exclusiveMinimum)
void
setMaximum(java.lang.Double maximum)
void
setMinimum(java.lang.Double minimum)
void
setMultipleOf(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:JsonSchema
Attempt to return this JsonSchema as aNumberSchema
- Overrides:
asNumberSchema
in 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:
getType
in classJsonSchema
-
isNumberSchema
public boolean isNumberSchema()
Description copied from class:JsonSchema
determine if this JsonSchema is anNumberSchema
.- Overrides:
isNumberSchema
in 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:
equals
in classValueTypeSchema
-
_equals
protected boolean _equals(NumberSchema that)
-
-