@NotThreadSafe public final class LeafSchemaNodeBuilder extends Object
LeafSchemaNode
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
LeafSchemaNodeBuilder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
Constructor and Description |
---|
LeafSchemaNodeBuilder()
Creates a builder for
LeafSchemaNode instances. |
Modifier and Type | Method and Description |
---|---|
LeafSchemaNode |
build()
Builds a new
LeafSchemaNode . |
LeafSchemaNodeBuilder |
description(Optional<String> description)
Initializes the optional value
description to description. |
LeafSchemaNodeBuilder |
description(String description)
Initializes the optional value
description to description. |
LeafSchemaNodeBuilder |
isAddedByUses(boolean isAddedByUses)
Initializes the value for the
isAddedByUses attribute. |
LeafSchemaNodeBuilder |
isAugmenting(boolean isAugmenting)
Initializes the value for the
isAugmenting attribute. |
LeafSchemaNodeBuilder |
isConfiguration(boolean isConfiguration)
Initializes the value for the
isConfiguration attribute. |
LeafSchemaNodeBuilder |
isMandatory(boolean isMandatory)
Initializes the value for the
isMandatory attribute. |
LeafSchemaNodeBuilder |
mustConstraints(Collection<MustDefinition> mustConstraints)
Initializes the value for the
mustConstraints attribute. |
LeafSchemaNodeBuilder |
path(SchemaPath path)
Initializes the value for the
path attribute. |
LeafSchemaNodeBuilder |
qName(QName qName)
Initializes the value for the
qName attribute. |
LeafSchemaNodeBuilder |
reference(Optional<String> reference)
Initializes the optional value
reference to reference. |
LeafSchemaNodeBuilder |
reference(String reference)
Initializes the optional value
reference to reference. |
LeafSchemaNodeBuilder |
status(Status status)
Initializes the value for the
status attribute. |
LeafSchemaNodeBuilder |
type(TypeDefinition<? extends TypeDefinition<?>> type)
Initializes the value for the
type attribute. |
LeafSchemaNodeBuilder |
whenCondition(Optional<? extends RevisionAwareXPath> whenCondition)
Initializes the optional value
whenCondition to whenCondition. |
LeafSchemaNodeBuilder |
whenCondition(RevisionAwareXPath whenCondition)
Initializes the optional value
whenCondition to whenCondition. |
public LeafSchemaNodeBuilder()
LeafSchemaNode
instances.public final LeafSchemaNodeBuilder type(TypeDefinition<? extends TypeDefinition<?>> type)
type
attribute.type
- The value for typethis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder isConfiguration(boolean isConfiguration)
isConfiguration
attribute.isConfiguration
- The value for isConfigurationthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder qName(QName qName)
qName
attribute.qName
- The value for qNamethis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder path(SchemaPath path)
path
attribute.path
- The value for paththis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder status(Status status)
status
attribute.status
- The value for statusthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder description(String description)
description
to description.description
- The value for descriptionthis
builder for chained invocationpublic final LeafSchemaNodeBuilder description(Optional<String> description)
description
to description.description
- The value for descriptionthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder reference(String reference)
reference
to reference.reference
- The value for referencethis
builder for chained invocationpublic final LeafSchemaNodeBuilder reference(Optional<String> reference)
reference
to reference.reference
- The value for referencethis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder isAugmenting(boolean isAugmenting)
isAugmenting
attribute.isAugmenting
- The value for isAugmentingthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder isAddedByUses(boolean isAddedByUses)
isAddedByUses
attribute.isAddedByUses
- The value for isAddedByUsesthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder whenCondition(RevisionAwareXPath whenCondition)
whenCondition
to whenCondition.whenCondition
- The value for whenConditionthis
builder for chained invocationpublic final LeafSchemaNodeBuilder whenCondition(Optional<? extends RevisionAwareXPath> whenCondition)
whenCondition
to whenCondition.whenCondition
- The value for whenConditionthis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder isMandatory(boolean isMandatory)
isMandatory
attribute.isMandatory
- The value for isMandatorythis
builder for use in a chained invocationpublic final LeafSchemaNodeBuilder mustConstraints(Collection<MustDefinition> mustConstraints)
mustConstraints
attribute.mustConstraints
- The value for mustConstraintsthis
builder for use in a chained invocationpublic LeafSchemaNode build()
LeafSchemaNode
.IllegalStateException
- if any required attributes are missingCopyright © 2019 OpenDaylight. All rights reserved.