Direct Known Subclasses:
IntegerSchema

public class NumberSchema extends ValueTypeSchema
This class represents a JsonSchema as a number type
  • Field Details

    • exclusiveMaximum

      private 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 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 Double maximum
      This attribute defines the maximum value of the instance property
    • minimum

      private Double minimum
      This attribute defines the minimum value of the instance property
    • multipleOf

      private Double multipleOf
      The value of the instance needs to be a multiple of this attribute
  • Constructor Details

    • NumberSchema

      public NumberSchema()
  • Method Details

    • asNumberSchema

      public NumberSchema asNumberSchema()
      Description copied from class: JsonSchema
      Attempt to return this JsonSchema as a NumberSchema
      Overrides:
      asNumberSchema in class JsonSchema
      Returns:
      this as a NumberSchema if possible, or null otherwise
    • getExclusiveMaximum

      public Boolean getExclusiveMaximum()
    • getExclusiveMinimum

      public Boolean getExclusiveMinimum()
    • getMaximum

      public Double getMaximum()
    • getMinimum

      public Double getMinimum()
    • getMultipleOf

      public Double getMultipleOf()
    • getType

      public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
      Specified by:
      getType in class JsonSchema
    • isNumberSchema

      public boolean isNumberSchema()
      Description copied from class: JsonSchema
      determine if this JsonSchema is an NumberSchema.
      Overrides:
      isNumberSchema in class JsonSchema
      Returns:
      true if this JsonSchema is an NumberSchema, false otherwise
    • setExclusiveMaximum

      public void setExclusiveMaximum(Boolean exclusiveMaximum)
    • setExclusiveMinimum

      public void setExclusiveMinimum(Boolean exclusiveMinimum)
    • setMaximum

      public void setMaximum(Double maximum)
    • setMinimum

      public void setMinimum(Double minimum)
    • setMultipleOf

      public void setMultipleOf(Double multipleOf)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ValueTypeSchema
    • _equals

      protected boolean _equals(NumberSchema that)