Class RsvpTeP2mpLspBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLspBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<RsvpTeP2mpLsp>
,org.opendaylight.yangtools.concepts.CheckedBuilder<RsvpTeP2mpLsp,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class RsvpTeP2mpLspBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<RsvpTeP2mpLsp>
Class that buildsRsvpTeP2mpLspBuilder
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:
RsvpTeP2mpLspBuilder createTarget(int fooXyzzy, int barBaz) { return new RsvpTeP2mpLspBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of RsvpTeP2mpLspBuilder, 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:
RsvpTeP2mpLspBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description RsvpTeP2mpLspBuilder()
RsvpTeP2mpLspBuilder(RsvpTeP2mpLsp base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RsvpTeP2mpLspBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp>>
E$$augmentation(Class<E$$> augmentationType)
RsvpTeP2mpLsp
build()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone
getExtendedTunnelId()
org.opendaylight.yangtools.yang.common.Uint32
getP2mpId()
org.opendaylight.yangtools.yang.common.Uint16
getTunnelId()
RsvpTeP2mpLspBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp>> augmentationType)
Remove an augmentation from this builder's product.RsvpTeP2mpLspBuilder
setExtendedTunnelId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone value)
RsvpTeP2mpLspBuilder
setP2mpId(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetP2mpId(Uint32)
instead.RsvpTeP2mpLspBuilder
setP2mpId(org.opendaylight.yangtools.yang.common.Uint32 value)
RsvpTeP2mpLspBuilder
setTunnelId(Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTunnelId(Uint16)
instead.RsvpTeP2mpLspBuilder
setTunnelId(org.opendaylight.yangtools.yang.common.Uint16 value)
-
-
-
Constructor Detail
-
RsvpTeP2mpLspBuilder
public RsvpTeP2mpLspBuilder()
-
RsvpTeP2mpLspBuilder
public RsvpTeP2mpLspBuilder(RsvpTeP2mpLsp base)
-
-
Method Detail
-
getExtendedTunnelId
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone getExtendedTunnelId()
-
getP2mpId
public org.opendaylight.yangtools.yang.common.Uint32 getP2mpId()
-
getTunnelId
public org.opendaylight.yangtools.yang.common.Uint16 getTunnelId()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp>> E$$ augmentation(Class<E$$> augmentationType)
-
setExtendedTunnelId
public RsvpTeP2mpLspBuilder setExtendedTunnelId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone value)
-
setP2mpId
public RsvpTeP2mpLspBuilder setP2mpId(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setP2mpId
@Deprecated(forRemoval=true) public RsvpTeP2mpLspBuilder setP2mpId(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetP2mpId(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setTunnelId
public RsvpTeP2mpLspBuilder setTunnelId(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setTunnelId
@Deprecated(forRemoval=true) public RsvpTeP2mpLspBuilder setTunnelId(Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTunnelId(Uint16)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
addAugmentation
public RsvpTeP2mpLspBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public RsvpTeP2mpLspBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RsvpTeP2mpLsp>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType
- augmentation type to be removed- Returns:
- this builder
-
build
public RsvpTeP2mpLsp build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<RsvpTeP2mpLsp>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<RsvpTeP2mpLsp,IllegalArgumentException>
-
-