Class NumberSchema

java.lang.Object
org.everit.json.schema.Schema
org.everit.json.schema.NumberSchema

public class NumberSchema extends Schema
Number schema validator.
  • Constructor Details

    • NumberSchema

      public NumberSchema()
    • NumberSchema

      public NumberSchema(NumberSchema.Builder builder)
      Constructor.
      Parameters:
      builder - the builder object containing validation criteria
  • Method Details

    • builder

      public static NumberSchema.Builder builder()
    • getMaximum

      public Number getMaximum()
    • getMinimum

      public Number getMinimum()
    • getMultipleOf

      public Number getMultipleOf()
    • isExclusiveMaximum

      public boolean isExclusiveMaximum()
    • isExclusiveMinimum

      public boolean isExclusiveMinimum()
    • requiresInteger

      public boolean requiresInteger()
    • isRequiresNumber

      public boolean isRequiresNumber()
    • getExclusiveMinimumLimit

      public Number getExclusiveMinimumLimit()
    • getExclusiveMaximumLimit

      public Number getExclusiveMaximumLimit()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Schema
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Schema
    • canEqual

      protected boolean canEqual(Object other)
      Description copied from class: Schema
      Since we add state in subclasses, but want those subclasses to be non final, this allows us to have equals methods that satisfy the equals contract.

      http://www.artima.com/lejava/articles/equality.html

      Overrides:
      canEqual in class Schema
      Parameters:
      other - the subject of comparison
      Returns:
      true if this can be equal to other