Class DpnRoutersListBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.dpn.routers.DpnRoutersListBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<DpnRoutersList>
,org.opendaylight.yangtools.concepts.CheckedBuilder<DpnRoutersList,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class DpnRoutersListBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<DpnRoutersList>
Class that buildsDpnRoutersListBuilder
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:
DpnRoutersListBuilder createTarget(int fooXyzzy, int barBaz) { return new DpnRoutersListBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of DpnRoutersListBuilder, 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:
DpnRoutersListBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description DpnRoutersListBuilder()
DpnRoutersListBuilder(DpnRoutersList base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DpnRoutersListBuilder
addAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
DpnRoutersList
build()
org.opendaylight.yangtools.yang.common.Uint64
getDpnId()
java.util.List<RoutersList>
getRoutersList()
DpnRoutersListKey
key()
DpnRoutersListBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>> augmentationType)
DpnRoutersListBuilder
setDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setDpnId(Uint64)} instead.DpnRoutersListBuilder
setDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
DpnRoutersListBuilder
setRoutersList(java.util.List<RoutersList> values)
DpnRoutersListBuilder
withKey(DpnRoutersListKey key)
-
-
-
Constructor Detail
-
DpnRoutersListBuilder
public DpnRoutersListBuilder()
-
DpnRoutersListBuilder
public DpnRoutersListBuilder(DpnRoutersList base)
-
-
Method Detail
-
key
public DpnRoutersListKey key()
-
getDpnId
public org.opendaylight.yangtools.yang.common.Uint64 getDpnId()
-
getRoutersList
public java.util.List<RoutersList> getRoutersList()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public DpnRoutersListBuilder withKey(DpnRoutersListKey key)
-
setDpnId
public DpnRoutersListBuilder setDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setDpnId
@Deprecated(forRemoval=true) public DpnRoutersListBuilder setDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setDpnId(Uint64)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRoutersList
public DpnRoutersListBuilder setRoutersList(java.util.List<RoutersList> values)
-
addAugmentation
public DpnRoutersListBuilder addAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList> augmentationValue)
-
removeAugmentation
public DpnRoutersListBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<DpnRoutersList>> augmentationType)
-
build
public DpnRoutersList build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<DpnRoutersList>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<DpnRoutersList,java.lang.IllegalArgumentException>
-
-