public class LabelBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Label>
LabelBuilder instances. Overall design of the class is that of a
fluent interface, where method chaining is used.
In general, this class is supposed to be used like this template:
LabelBuilder createTarget(int fooXyzzy, int barBaz) {
return new LabelBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of LabelBuilder, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
build(), which is then returned from the methodLabelBuilder,
Builder| Constructor and Description |
|---|
LabelBuilder() |
LabelBuilder(CSubobject arg) |
LabelBuilder(Label base) |
LabelBuilder(LabelSubobject arg) |
| Modifier and Type | Method and Description |
|---|---|
LabelBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Label> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> |
augmentation(Class<E$$> augmentationType) |
Label |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
LabelType |
getLabelType() |
Boolean |
isGlobal() |
Boolean |
isUniDirectional() |
LabelBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> augmentationType) |
LabelBuilder |
setGlobal(Boolean value) |
LabelBuilder |
setLabelType(LabelType value) |
LabelBuilder |
setUniDirectional(Boolean value) |
public LabelBuilder()
public LabelBuilder(LabelSubobject arg)
public LabelBuilder(CSubobject arg)
public LabelBuilder(Label base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg - grouping objectIllegalArgumentException - if given argument is none of valid typespublic LabelType getLabelType()
public Boolean isGlobal()
public Boolean isUniDirectional()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> E$$ augmentation(Class<E$$> augmentationType)
public LabelBuilder setLabelType(LabelType value)
public LabelBuilder setGlobal(Boolean value)
public LabelBuilder setUniDirectional(Boolean value)
public LabelBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Label> augmentationValue)
public LabelBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Label>> augmentationType)
public Label build()
build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Label,IllegalArgumentException>Copyright © 2020 OpenDaylight. All rights reserved.