Class PcepCreateP2pTunnelInputBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.programming.rev181109.PcepCreateP2pTunnelInputBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<PcepCreateP2pTunnelInput>
,org.opendaylight.yangtools.concepts.CheckedBuilder<PcepCreateP2pTunnelInput,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class PcepCreateP2pTunnelInputBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<PcepCreateP2pTunnelInput>
Class that buildsPcepCreateP2pTunnelInput
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:
PcepCreateP2pTunnelInput createPcepCreateP2pTunnelInput(int fooXyzzy, int barBaz) { return new PcepCreateP2pTunnelInputBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of PcepCreateP2pTunnelInput, 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 opportunities, 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:
PcepCreateP2pTunnelInput
,Builder
-
-
Constructor Summary
-
Method Summary
-
-
-
Constructor Detail
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder()
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(CreateP2pTunnelInput arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(CreateTunnelInput arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(TopologyInstructionInput arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(SubmitInstructionInput arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(NetworkTopologyReference arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(TunnelP2pPathCfgAttributes arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(TunnelPcepLinkCfgAttributes arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(TunnelAttributes arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(Priority arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(AttributeFilters arg)
-
PcepCreateP2pTunnelInputBuilder
public PcepCreateP2pTunnelInputBuilder(PcepCreateP2pTunnelInput 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:- TopologyInstructionInput
- SubmitInstructionInput
- TunnelP2pPathCfgAttributes
- Priority
- AttributeFilters
- NetworkTopologyReference
- TunnelPcepLinkCfgAttributes
- TunnelAttributes
- CreateTunnelInput
- CreateP2pTunnelInput
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getBandwidth
public Bandwidth getBandwidth()
-
getClassType
public ClassType getClassType()
-
getDeadline
public Nanotime getDeadline()
-
getDestination
public Destination getDestination()
-
getExcludeAny
public AttributeFilter getExcludeAny()
-
getExplicitHops
public Map<ExplicitHopsKey,ExplicitHops> getExplicitHops()
-
getHoldPriority
public org.opendaylight.yangtools.yang.common.Uint8 getHoldPriority()
-
getId
public InstructionId getId()
-
getIncludeAll
public AttributeFilter getIncludeAll()
-
getIncludeAny
public AttributeFilter getIncludeAny()
-
getLabelRecordingDesired
public Boolean getLabelRecordingDesired()
-
getLocalProtectionDesired
public Boolean getLocalProtectionDesired()
-
getNetworkTopologyRef
public NetworkTopologyRef getNetworkTopologyRef()
-
getPreconditions
public List<InstructionId> getPreconditions()
-
getSeStyleDesired
public Boolean getSeStyleDesired()
-
getSessionName
public String getSessionName()
-
getSetupPriority
public org.opendaylight.yangtools.yang.common.Uint8 getSetupPriority()
-
getSource
public Source getSource()
-
getSymbolicPathName
public String getSymbolicPathName()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PcepCreateP2pTunnelInput>> E$$ augmentation(Class<E$$> augmentationType)
-
setBandwidth
public PcepCreateP2pTunnelInputBuilder setBandwidth(Bandwidth value)
-
setClassType
public PcepCreateP2pTunnelInputBuilder setClassType(ClassType value)
-
setDeadline
public PcepCreateP2pTunnelInputBuilder setDeadline(Nanotime value)
-
setDestination
public PcepCreateP2pTunnelInputBuilder setDestination(Destination value)
-
setExcludeAny
public PcepCreateP2pTunnelInputBuilder setExcludeAny(AttributeFilter value)
-
setExplicitHops
public PcepCreateP2pTunnelInputBuilder setExplicitHops(Map<ExplicitHopsKey,ExplicitHops> values)
-
setHoldPriority
public PcepCreateP2pTunnelInputBuilder setHoldPriority(org.opendaylight.yangtools.yang.common.Uint8 value)
-
setId
public PcepCreateP2pTunnelInputBuilder setId(InstructionId value)
-
setIncludeAll
public PcepCreateP2pTunnelInputBuilder setIncludeAll(AttributeFilter value)
-
setIncludeAny
public PcepCreateP2pTunnelInputBuilder setIncludeAny(AttributeFilter value)
-
setLabelRecordingDesired
public PcepCreateP2pTunnelInputBuilder setLabelRecordingDesired(Boolean value)
-
setLocalProtectionDesired
public PcepCreateP2pTunnelInputBuilder setLocalProtectionDesired(Boolean value)
-
setNetworkTopologyRef
public PcepCreateP2pTunnelInputBuilder setNetworkTopologyRef(NetworkTopologyRef value)
-
setPreconditions
public PcepCreateP2pTunnelInputBuilder setPreconditions(List<InstructionId> values)
-
setSeStyleDesired
public PcepCreateP2pTunnelInputBuilder setSeStyleDesired(Boolean value)
-
setSessionName
public PcepCreateP2pTunnelInputBuilder setSessionName(String value)
-
setSetupPriority
public PcepCreateP2pTunnelInputBuilder setSetupPriority(org.opendaylight.yangtools.yang.common.Uint8 value)
-
setSource
public PcepCreateP2pTunnelInputBuilder setSource(Source value)
-
setSymbolicPathName
public PcepCreateP2pTunnelInputBuilder setSymbolicPathName(String value)
-
addAugmentation
public PcepCreateP2pTunnelInputBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<PcepCreateP2pTunnelInput> 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 PcepCreateP2pTunnelInputBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PcepCreateP2pTunnelInput>> 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 PcepCreateP2pTunnelInput build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<PcepCreateP2pTunnelInput>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<PcepCreateP2pTunnelInput,IllegalArgumentException>
-
-