public class NxEncapBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<NxEncap>
NxEncapBuilder 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:
NxEncapBuilder createTarget(int fooXyzzy, int barBaz) {
return new NxEncapBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of NxEncapBuilder, 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 methodNxEncapBuilder,
Builder| Constructor and Description |
|---|
NxEncapBuilder() |
NxEncapBuilder(NxEncap base) |
NxEncapBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.PacketTypeFields arg) |
| Modifier and Type | Method and Description |
|---|---|
NxEncapBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> |
augmentation(Class<E$$> augmentationType) |
NxEncap |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
Long |
getPacketType() |
NxEncapBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> augmentationType) |
NxEncapBuilder |
setPacketType(Long value) |
public NxEncapBuilder()
public NxEncapBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.PacketTypeFields arg)
public NxEncapBuilder(NxEncap base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg - grouping objectIllegalArgumentException - if given argument is none of valid typespublic Long getPacketType()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> E$$ augmentation(Class<E$$> augmentationType)
public NxEncapBuilder setPacketType(Long value)
public NxEncapBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap> augmentationValue)
public NxEncapBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NxEncap>> augmentationType)
public NxEncap build()
build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<NxEncap,IllegalArgumentException>Copyright © 2019 OpenDaylight. All rights reserved.