public static class TypedJsonSchemaObject.NumericJsonSchemaObject extends TypedJsonSchemaObject
JsonSchemaObject implementation of type : 'number', bsonType : 'int',
bsonType : 'long', bsonType : 'double' and bsonType : 'decimal128' schema elements.schema objects.TypedJsonSchemaObject.ArrayJsonSchemaObject, TypedJsonSchemaObject.BooleanJsonSchemaObject, TypedJsonSchemaObject.NumericJsonSchemaObject, TypedJsonSchemaObject.ObjectJsonSchemaObject, TypedJsonSchemaObject.StringJsonSchemaObjectJsonSchemaObject.Typetypesdescription, generateDescription, restrictions| Modifier and Type | Method and Description |
|---|---|
TypedJsonSchemaObject.NumericJsonSchemaObject |
allOf(Collection<JsonSchemaObject> allOf)
The field value must match all specified schemas.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
anyOf(Collection<JsonSchemaObject> anyOf)
The field value must match at least one of the specified schemas.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
description(String description)
Set the description.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
generatedDescription()
Auto generate the description if not explicitly set.
|
protected String |
generateDescription()
Customization hook for creating description out of defined values.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
gt(Number min)
Set minimum to given
min value and exclusiveMinimum to true. |
TypedJsonSchemaObject.NumericJsonSchemaObject |
gte(Number min)
Set minimum to given
min value and exclusiveMinimum to false. |
TypedJsonSchemaObject.NumericJsonSchemaObject |
lt(Number max)
Set maximum to given
max value and exclusiveMaximum to true. |
TypedJsonSchemaObject.NumericJsonSchemaObject |
notMatch(JsonSchemaObject notMatch)
The field value must not match the specified schemas.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
oneOf(Collection<JsonSchemaObject> oneOf)
The field value must match exactly one of the specified schemas.
|
TypedJsonSchemaObject.NumericJsonSchemaObject |
possibleValues(Collection<? extends Object> possibleValues)
enumerates all possible values of the field.
|
org.bson.Document |
toDocument()
Create the JSON schema complying
Document representation. |
TypedJsonSchemaObject.NumericJsonSchemaObject |
within(Range<? extends Number> range)
Set the
Range of valid field values translating to minimum, exclusiveMinimum,
maximum and exclusiveMaximum. |
getTypes, ofnewInstancepublic TypedJsonSchemaObject.NumericJsonSchemaObject within(Range<? extends Number> range)
Range of valid field values translating to minimum, exclusiveMinimum,
maximum and exclusiveMaximum.range - must not be null.TypedJsonSchemaObject.NumericJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject gt(Number min)
min value and exclusiveMinimum to true.min - must not be null.TypedJsonSchemaObject.NumericJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject gte(Number min)
min value and exclusiveMinimum to false.min - must not be null.TypedJsonSchemaObject.NumericJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject lt(Number max)
max value and exclusiveMaximum to true.max - must not be null.TypedJsonSchemaObject.NumericJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject possibleValues(Collection<? extends Object> possibleValues)
TypedJsonSchemaObjectpossibleValues in class TypedJsonSchemaObjectpossibleValues - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject allOf(Collection<JsonSchemaObject> allOf)
TypedJsonSchemaObjectallOf in class TypedJsonSchemaObjectallOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject anyOf(Collection<JsonSchemaObject> anyOf)
TypedJsonSchemaObjectanyOf in class TypedJsonSchemaObjectanyOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject oneOf(Collection<JsonSchemaObject> oneOf)
TypedJsonSchemaObjectoneOf in class TypedJsonSchemaObjectoneOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject notMatch(JsonSchemaObject notMatch)
TypedJsonSchemaObjectnotMatch in class TypedJsonSchemaObjectTypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject description(String description)
TypedJsonSchemaObjectdescription in class TypedJsonSchemaObjectdescription - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.NumericJsonSchemaObject generatedDescription()
TypedJsonSchemaObjectgeneratedDescription in class TypedJsonSchemaObjectTypedJsonSchemaObject.public org.bson.Document toDocument()
TypedJsonSchemaObjectDocument representation. This includes type,
description and the fields of Restrictions#toDocument() if set.toDocument in interface JsonSchemaObjecttoDocument in class TypedJsonSchemaObjectprotected String generateDescription()
TypedJsonSchemaObjectTypedJsonSchemaObject.toDocument() when no explicit TypedJsonSchemaObject.description(java.lang.String) is set.generateDescription in class TypedJsonSchemaObjectCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.