Package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev181109
Class Link1Builder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev181109.Link1Builder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Link1>
,org.opendaylight.yangtools.concepts.CheckedBuilder<Link1,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class Link1Builder extends Object implements org.opendaylight.yangtools.concepts.Builder<Link1>
Class that buildsLink1Builder
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:
Link1Builder createTarget(int fooXyzzy, int barBaz) { return new Link1BuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of Link1Builder, 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:
Link1Builder
,Builder
-
-
Constructor Summary
Constructors Constructor Description Link1Builder()
Link1Builder(AttributeFilters arg)
Link1Builder(Priority arg)
Link1Builder(TunnelAttributes arg)
Link1Builder(Link1 base)
Link1Builder(TunnelPcepLinkCfgAttributes arg)
Link1Builder(TunnelPcepLinkOperAttributes arg)
-
Method Summary
-
-
-
Constructor Detail
-
Link1Builder
public Link1Builder()
-
Link1Builder
public Link1Builder(TunnelPcepLinkCfgAttributes arg)
-
Link1Builder
public Link1Builder(TunnelAttributes arg)
-
Link1Builder
public Link1Builder(Priority arg)
-
Link1Builder
public Link1Builder(AttributeFilters arg)
-
Link1Builder
public Link1Builder(TunnelPcepLinkOperAttributes arg)
-
Link1Builder
public Link1Builder(Link1 base)
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.Priority
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AttributeFilters
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev181109.TunnelPcepLinkCfgAttributes
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TunnelAttributes
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev181109.TunnelPcepLinkOperAttributes
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
getBandwidth
public Bandwidth getBandwidth()
-
getClassType
public ClassType getClassType()
-
getExcludeAny
public AttributeFilter getExcludeAny()
-
getHoldPriority
public org.opendaylight.yangtools.yang.common.Uint8 getHoldPriority()
-
getIncludeAll
public AttributeFilter getIncludeAll()
-
getIncludeAny
public AttributeFilter getIncludeAny()
-
getSessionName
public String getSessionName()
-
getSetupPriority
public org.opendaylight.yangtools.yang.common.Uint8 getSetupPriority()
-
getSymbolicPathName
public String getSymbolicPathName()
-
isLabelRecordingDesired
public Boolean isLabelRecordingDesired()
-
isLocalProtectionDesired
public Boolean isLocalProtectionDesired()
-
isSeStyleDesired
public Boolean isSeStyleDesired()
-
setBandwidth
public Link1Builder setBandwidth(Bandwidth value)
-
setClassType
public Link1Builder setClassType(ClassType value)
-
setExcludeAny
public Link1Builder setExcludeAny(AttributeFilter value)
-
setHoldPriority
public Link1Builder setHoldPriority(org.opendaylight.yangtools.yang.common.Uint8 value)
-
setHoldPriority
@Deprecated(forRemoval=true) public Link1Builder setHoldPriority(Short value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetHoldPriority(Uint8)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setIncludeAll
public Link1Builder setIncludeAll(AttributeFilter value)
-
setIncludeAny
public Link1Builder setIncludeAny(AttributeFilter value)
-
setSessionName
public Link1Builder setSessionName(String value)
-
setSetupPriority
public Link1Builder setSetupPriority(org.opendaylight.yangtools.yang.common.Uint8 value)
-
setSetupPriority
@Deprecated(forRemoval=true) public Link1Builder setSetupPriority(Short value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSetupPriority(Uint8)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setSymbolicPathName
public Link1Builder setSymbolicPathName(String value)
-
setLabelRecordingDesired
public Link1Builder setLabelRecordingDesired(Boolean value)
-
setLocalProtectionDesired
public Link1Builder setLocalProtectionDesired(Boolean value)
-
setSeStyleDesired
public Link1Builder setSeStyleDesired(Boolean value)
-
build
public Link1 build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<Link1>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<Link1,IllegalArgumentException>
-
-