public final class ConstraintsBuilderImpl extends Object implements ConstraintsBuilder
| Constructor and Description |
|---|
ConstraintsBuilderImpl(String moduleName,
int line) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMustDefinition(org.opendaylight.yangtools.yang.model.api.MustDefinition must)
Adds must definition to product of this builder.
|
void |
addWhenCondition(String whenCondition)
Sets when condition associated with this constraints.
|
int |
getLine()
Return line on which constraints were defined.
|
Integer |
getMaxElements()
Returns number of maximum required elements.
|
Integer |
getMinElements()
Returns number of minimum required elements.
|
String |
getModuleName()
Returns module name in which constraint is defined.
|
Set<org.opendaylight.yangtools.yang.model.api.MustDefinition> |
getMustDefinitions()
Returns
must definition associated with this builder. |
String |
getWhenCondition()
Returns when condition associated with this constraints.
|
boolean |
isMandatory()
Returns true if associated node is mandatory.
|
void |
setMandatory(boolean mandatory)
Sets mandatory status of parent node
|
void |
setMaxElements(Integer maxElements)
Sets number of maximum required elements.
|
void |
setMinElements(Integer minElements)
Sets number of minimum required elements.
|
org.opendaylight.yangtools.yang.model.api.ConstraintDefinition |
toInstance()
Build constraint definition
|
public ConstraintsBuilderImpl(String moduleName, int line)
public org.opendaylight.yangtools.yang.model.api.ConstraintDefinition toInstance()
ConstraintsBuildertoInstance in interface org.opendaylight.yangtools.concepts.Builder<org.opendaylight.yangtools.yang.model.api.ConstraintDefinition>toInstance in interface ConstraintsBuilderpublic String getModuleName()
ConstraintsBuildergetModuleName in interface ConstraintsBuilderpublic int getLine()
ConstraintsBuildergetLine in interface ConstraintsBuilderpublic Integer getMinElements()
ConstraintsBuildergetMinElements in interface ConstraintsBuilderpublic void setMinElements(Integer minElements)
ConstraintsBuildersetMinElements in interface ConstraintsBuilderminElements - number of minimum required elements.public Integer getMaxElements()
ConstraintsBuildergetMaxElements in interface ConstraintsBuilderpublic void setMaxElements(Integer maxElements)
ConstraintsBuildersetMaxElements in interface ConstraintsBuildermaxElements - number of maximum required elements.public Set<org.opendaylight.yangtools.yang.model.api.MustDefinition> getMustDefinitions()
ConstraintsBuildermust definition associated with this builder.getMustDefinitions in interface ConstraintsBuildermust definition associated with this builder.public void addMustDefinition(org.opendaylight.yangtools.yang.model.api.MustDefinition must)
ConstraintsBuilderaddMustDefinition in interface ConstraintsBuildermust - must definition which should be associated with
parent node.public String getWhenCondition()
ConstraintsBuildergetWhenCondition in interface ConstraintsBuilderpublic void addWhenCondition(String whenCondition)
ConstraintsBuilderaddWhenCondition in interface ConstraintsBuilderwhenCondition - when condition.public boolean isMandatory()
ConstraintsBuilderisMandatory in interface ConstraintsBuilderpublic void setMandatory(boolean mandatory)
ConstraintsBuildersetMandatory in interface ConstraintsBuilderCopyright © 2014. All rights reserved.