public class NamedPropertyImpl extends Object implements NamedProperty
NamedProperty interface.| Constructor and Description |
|---|
NamedPropertyImpl(String name,
JsonType type,
JsonType[] moreTypes,
boolean required)
Constructs this property.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the name of this property.
|
TypeSet |
getTypeSet()
Returns the set of types allowed for this property.
|
boolean |
isRequired()
Returns whether this property is required or not in the containing object.
|
boolean |
matches(String name)
Matches the given name to this property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOptionalpublic NamedPropertyImpl(String name, JsonType type, JsonType[] moreTypes, boolean required)
name - the name of this property. Cannot be null.type - the type of this property value. Cannot be null.moreTypes - the other types allowed for this property value. Each type cannot be null.required - whether this property is required or not in the containing object.SchemaException - if name is null or
if one of types has the same TypeId as others or null.public String getName()
NamedPropertygetName in interface NamedPropertypublic TypeSet getTypeSet()
PropertygetTypeSet in interface Propertypublic boolean isRequired()
PropertyisRequired in interface Propertytrue if this property is required or false if this property is optional.Property.isOptional()Copyright © 2016–2017. All rights reserved.