com.fasterxml.jackson.databind.jsonSchema.types
Class UnionTypeSchema
java.lang.Object
com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema
com.fasterxml.jackson.databind.jsonSchema.types.UnionTypeSchema
public class UnionTypeSchema
- extends JsonSchema
This class represents a JsonSchema as a Union Type Schema:
"An array of two or more simple type definitions. Each
item in the array MUST be a simple type definition or a schema.
The instance value is valid if it is of the same type as one of
the simple type definitions, or valid by one of the schemas, in
the array."
- Author:
- jphelan
| Methods inherited from class com.fasterxml.jackson.databind.jsonSchema.types.JsonSchema |
asAnySchema, asArraySchema, asBooleanSchema, asContainerSchema, asIntegerSchema, asNullSchema, asNumberSchema, asObjectSchema, asSimpleTypeSchema, asStringSchema, asValueSchemaSchema, get$ref, get$schema, getDisallow, getExtends, getId, getRequired, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isSimpleTypeSchema, isStringSchema, isValueTypeSchema, minimalForFormat, set$ref, set$schema, setDisallow, setExtends, setId, setRequired |
UnionTypeSchema
public UnionTypeSchema()
asUnionTypeSchema
public UnionTypeSchema asUnionTypeSchema()
- Description copied from class:
JsonSchema
- Attempt to return this JsonSchema as an
UnionTypeSchema
- Overrides:
asUnionTypeSchema in class JsonSchema
- Returns:
- this as a UnionTypeSchema if possible, or null otherwise
equals
public boolean equals(Object obj)
- Overrides:
equals in class JsonSchema
getElements
public ValueTypeSchema[] getElements()
elements
- Returns:
- the elements
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
- Specified by:
getType in class JsonSchema
isUnionTypeSchema
public boolean isUnionTypeSchema()
- Description copied from class:
JsonSchema
- determine if this JsonSchema is an
UnionTypeSchema.
- Overrides:
isUnionTypeSchema in class JsonSchema
- Returns:
- true if this JsonSchema is an UnionTypeSchema, false otherwise
setElements
public void setElements(ValueTypeSchema[] elements)
elements
- Parameters:
elements - the elements to set
Copyright © 2012 fasterxml.com. All Rights Reserved.