Package org.everit.json.schema
Class NumberSchema
- java.lang.Object
-
- org.everit.json.schema.Schema
-
- org.everit.json.schema.NumberSchema
-
public class NumberSchema extends Schema
Number schema validator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NumberSchema.Builder
Builder class forNumberSchema
.
-
Field Summary
-
Fields inherited from class org.everit.json.schema.Schema
schemaLocation
-
-
Constructor Summary
Constructors Constructor Description NumberSchema()
NumberSchema(NumberSchema.Builder builder)
Constructor.
-
Method Summary
Modifier and Type Method Description static NumberSchema.Builder
builder()
protected boolean
canEqual(Object other)
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.boolean
equals(Object o)
Number
getExclusiveMaximumLimit()
Number
getExclusiveMinimumLimit()
Number
getMaximum()
Number
getMinimum()
Number
getMultipleOf()
int
hashCode()
boolean
isExclusiveMaximum()
boolean
isExclusiveMinimum()
boolean
isRequiresNumber()
boolean
requiresInteger()
-
Methods inherited from class org.everit.json.schema.Schema
definesProperty, describeTo, failure, failure, getDefaultValue, getDescription, getId, getLocation, getSchemaLocation, getTitle, getUnprocessedProperties, hasDefaultValue, isNullable, isReadOnly, isWriteOnly, toString, validate
-
-
-
-
Constructor Detail
-
NumberSchema
public NumberSchema()
-
NumberSchema
public NumberSchema(NumberSchema.Builder builder)
Constructor.- Parameters:
builder
- the builder object containing validation criteria
-
-
Method Detail
-
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()
-
-