Class Inet4SpecificExtendedCommunityCaseBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.Inet4SpecificExtendedCommunityCaseBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Inet4SpecificExtendedCommunityCase>
,org.opendaylight.yangtools.concepts.CheckedBuilder<Inet4SpecificExtendedCommunityCase,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class Inet4SpecificExtendedCommunityCaseBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Inet4SpecificExtendedCommunityCase>
Class that buildsInet4SpecificExtendedCommunityCaseBuilder
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:
Inet4SpecificExtendedCommunityCaseBuilder createTarget(int fooXyzzy, int barBaz) { return new Inet4SpecificExtendedCommunityCaseBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of Inet4SpecificExtendedCommunityCaseBuilder, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
build()
, which is then returned from the method - better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
- better optimization oportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
- See Also:
Inet4SpecificExtendedCommunityCaseBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description Inet4SpecificExtendedCommunityCaseBuilder()
Inet4SpecificExtendedCommunityCaseBuilder(Inet4SpecificExtendedCommunityCase base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Inet4SpecificExtendedCommunityCaseBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>>
E$$augmentation(Class<E$$> augmentationType)
Inet4SpecificExtendedCommunityCase
build()
Inet4SpecificExtendedCommunity
getInet4SpecificExtendedCommunity()
Inet4SpecificExtendedCommunityCaseBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>> augmentationType)
Inet4SpecificExtendedCommunityCaseBuilder
setInet4SpecificExtendedCommunity(Inet4SpecificExtendedCommunity value)
-
-
-
Constructor Detail
-
Inet4SpecificExtendedCommunityCaseBuilder
public Inet4SpecificExtendedCommunityCaseBuilder()
-
Inet4SpecificExtendedCommunityCaseBuilder
public Inet4SpecificExtendedCommunityCaseBuilder(Inet4SpecificExtendedCommunityCase base)
-
-
Method Detail
-
getInet4SpecificExtendedCommunity
public Inet4SpecificExtendedCommunity getInet4SpecificExtendedCommunity()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>> E$$ augmentation(Class<E$$> augmentationType)
-
setInet4SpecificExtendedCommunity
public Inet4SpecificExtendedCommunityCaseBuilder setInet4SpecificExtendedCommunity(Inet4SpecificExtendedCommunity value)
-
addAugmentation
public Inet4SpecificExtendedCommunityCaseBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase> augmentationValue)
-
removeAugmentation
public Inet4SpecificExtendedCommunityCaseBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Inet4SpecificExtendedCommunityCase>> augmentationType)
-
build
public Inet4SpecificExtendedCommunityCase build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<Inet4SpecificExtendedCommunityCase>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<Inet4SpecificExtendedCommunityCase,IllegalArgumentException>
-
-