Class As4RouteOriginExtendedCommunityCaseBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.As4RouteOriginExtendedCommunityCaseBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<As4RouteOriginExtendedCommunityCase>
,org.opendaylight.yangtools.concepts.CheckedBuilder<As4RouteOriginExtendedCommunityCase,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class As4RouteOriginExtendedCommunityCaseBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<As4RouteOriginExtendedCommunityCase>
Class that buildsAs4RouteOriginExtendedCommunityCaseBuilder
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:
As4RouteOriginExtendedCommunityCaseBuilder createTarget(int fooXyzzy, int barBaz) { return new As4RouteOriginExtendedCommunityCaseBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of As4RouteOriginExtendedCommunityCaseBuilder, 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:
As4RouteOriginExtendedCommunityCaseBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description As4RouteOriginExtendedCommunityCaseBuilder()
As4RouteOriginExtendedCommunityCaseBuilder(As4RouteOriginExtendedCommunityCase base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description As4RouteOriginExtendedCommunityCaseBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>>
E$$augmentation(Class<E$$> augmentationType)
As4RouteOriginExtendedCommunityCase
build()
As4RouteOriginExtendedCommunity
getAs4RouteOriginExtendedCommunity()
As4RouteOriginExtendedCommunityCaseBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>> augmentationType)
As4RouteOriginExtendedCommunityCaseBuilder
setAs4RouteOriginExtendedCommunity(As4RouteOriginExtendedCommunity value)
-
-
-
Constructor Detail
-
As4RouteOriginExtendedCommunityCaseBuilder
public As4RouteOriginExtendedCommunityCaseBuilder()
-
As4RouteOriginExtendedCommunityCaseBuilder
public As4RouteOriginExtendedCommunityCaseBuilder(As4RouteOriginExtendedCommunityCase base)
-
-
Method Detail
-
getAs4RouteOriginExtendedCommunity
public As4RouteOriginExtendedCommunity getAs4RouteOriginExtendedCommunity()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>> E$$ augmentation(Class<E$$> augmentationType)
-
setAs4RouteOriginExtendedCommunity
public As4RouteOriginExtendedCommunityCaseBuilder setAs4RouteOriginExtendedCommunity(As4RouteOriginExtendedCommunity value)
-
addAugmentation
public As4RouteOriginExtendedCommunityCaseBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase> augmentationValue)
-
removeAugmentation
public As4RouteOriginExtendedCommunityCaseBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<As4RouteOriginExtendedCommunityCase>> augmentationType)
-
build
public As4RouteOriginExtendedCommunityCase build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<As4RouteOriginExtendedCommunityCase>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<As4RouteOriginExtendedCommunityCase,IllegalArgumentException>
-
-