public class InstructionsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Instructions>
InstructionsBuilder
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:
InstructionsBuilder createTarget(int fooXyzzy, int barBaz) {
return new InstructionsBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of InstructionsBuilder, 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 methodInstructionsBuilder
,
Builder
Constructor and Description |
---|
InstructionsBuilder() |
InstructionsBuilder(InstructionList arg) |
InstructionsBuilder(Instructions base) |
Modifier and Type | Method and Description |
---|---|
InstructionsBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Instructions> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> |
augmentation(Class<E$$> augmentationType) |
Instructions |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
List<Instruction> |
getInstruction() |
InstructionsBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> augmentationType) |
InstructionsBuilder |
setInstruction(List<Instruction> values) |
public InstructionsBuilder()
public InstructionsBuilder(InstructionList arg)
public InstructionsBuilder(Instructions base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic List<Instruction> getInstruction()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> E$$ augmentation(Class<E$$> augmentationType)
public InstructionsBuilder setInstruction(List<Instruction> values)
public InstructionsBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Instructions> augmentationValue)
public InstructionsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Instructions>> augmentationType)
public Instructions build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Instructions,IllegalArgumentException>
Copyright © 2020 OpenDaylight. All rights reserved.