Class LinkAttributesBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.linkstate.path.attribute.link.state.attribute.link.attributes._case.LinkAttributesBuilder
-
@Generated("mdsal-binding-generator") public class LinkAttributesBuilder extends Object
Class that buildsLinkAttributes
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:
LinkAttributes createLinkAttributes(int fooXyzzy, int barBaz) { return new LinkAttributesBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of LinkAttributes, 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:
LinkAttributes
- 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
-
-
Constructor Summary
Constructors Constructor Description LinkAttributesBuilder()
Construct an empty builder.LinkAttributesBuilder(LinkAttributes base)
Construct a builder initialized with state from specifiedLinkAttributes
.LinkAttributesBuilder(LinkstateAttribute arg)
Construct a new builder initialized from specifiedLinkstateAttribute
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkAttributesBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes>>
E$$augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.@NonNull LinkAttributes
build()
A newLinkAttributes
instance.void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.AdministrativeGroup
getAdminGroup()
Return current value associated with the property corresponding toLinkstateAttribute.getAdminGroup()
.Bandwidth
getAvailableBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getAvailableBandwidth()
.Delay
getDelayVariation()
Return current value associated with the property corresponding toLinkstateAttribute.getDelayVariation()
.Delay
getLinkDelay()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkDelay()
.Loss
getLinkLoss()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkLoss()
.LinkMinMaxDelay
getLinkMinMaxDelay()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkMinMaxDelay()
.String
getLinkName()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkName()
.LinkProtectionType
getLinkProtection()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkProtection()
.Ipv4RouterIdentifier
getLocalIpv4RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getLocalIpv4RouterId()
.Ipv6RouterIdentifier
getLocalIpv6RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getLocalIpv6RouterId()
.Bandwidth
getMaxLinkBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getMaxLinkBandwidth()
.Bandwidth
getMaxReservableBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getMaxReservableBandwidth()
.Metric
getMetric()
Return current value associated with the property corresponding toLinkstateAttribute.getMetric()
.MplsProtocolMask
getMplsProtocol()
Return current value associated with the property corresponding toLinkstateAttribute.getMplsProtocol()
.PeerAdjSid
getPeerAdjSid()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerAdjSid()
.PeerNodeSid
getPeerNodeSid()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerNodeSid()
.List<PeerSetSids>
getPeerSetSids()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerSetSids()
.Ipv4RouterIdentifier
getRemoteIpv4RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getRemoteIpv4RouterId()
.Ipv6RouterIdentifier
getRemoteIpv6RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getRemoteIpv6RouterId()
.Bandwidth
getResidualBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getResidualBandwidth()
.Set<SrlgId>
getSharedRiskLinkGroups()
Return current value associated with the property corresponding toLinkstateAttribute.getSharedRiskLinkGroups()
.List<SrAdjIds>
getSrAdjIds()
Return current value associated with the property corresponding toLinkstateAttribute.getSrAdjIds()
.List<SrLanAdjIds>
getSrLanAdjIds()
Return current value associated with the property corresponding toLinkstateAttribute.getSrLanAdjIds()
.TeMetric
getTeMetric()
Return current value associated with the property corresponding toLinkstateAttribute.getTeMetric()
.Map<UnreservedBandwidthKey,UnreservedBandwidth>
getUnreservedBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getUnreservedBandwidth()
.Bandwidth
getUtilizedBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getUtilizedBandwidth()
.LinkAttributesBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes>> augmentationType)
Remove an augmentation from this builder's product.LinkAttributesBuilder
setAdminGroup(AdministrativeGroup value)
Set the property corresponding toLinkstateAttribute.getAdminGroup()
to the specified value.LinkAttributesBuilder
setAvailableBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getAvailableBandwidth()
to the specified value.LinkAttributesBuilder
setDelayVariation(Delay value)
Set the property corresponding toLinkstateAttribute.getDelayVariation()
to the specified value.LinkAttributesBuilder
setLinkDelay(Delay value)
Set the property corresponding toLinkstateAttribute.getLinkDelay()
to the specified value.LinkAttributesBuilder
setLinkLoss(Loss value)
Set the property corresponding toLinkstateAttribute.getLinkLoss()
to the specified value.LinkAttributesBuilder
setLinkMinMaxDelay(LinkMinMaxDelay value)
Set the property corresponding toLinkstateAttribute.getLinkMinMaxDelay()
to the specified value.LinkAttributesBuilder
setLinkName(String value)
Set the property corresponding toLinkstateAttribute.getLinkName()
to the specified value.LinkAttributesBuilder
setLinkProtection(LinkProtectionType value)
Set the property corresponding toLinkstateAttribute.getLinkProtection()
to the specified value.LinkAttributesBuilder
setLocalIpv4RouterId(Ipv4RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getLocalIpv4RouterId()
to the specified value.LinkAttributesBuilder
setLocalIpv6RouterId(Ipv6RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getLocalIpv6RouterId()
to the specified value.LinkAttributesBuilder
setMaxLinkBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getMaxLinkBandwidth()
to the specified value.LinkAttributesBuilder
setMaxReservableBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getMaxReservableBandwidth()
to the specified value.LinkAttributesBuilder
setMetric(Metric value)
Set the property corresponding toLinkstateAttribute.getMetric()
to the specified value.LinkAttributesBuilder
setMplsProtocol(MplsProtocolMask value)
Set the property corresponding toLinkstateAttribute.getMplsProtocol()
to the specified value.LinkAttributesBuilder
setPeerAdjSid(PeerAdjSid value)
Set the property corresponding toLinkstateAttribute.getPeerAdjSid()
to the specified value.LinkAttributesBuilder
setPeerNodeSid(PeerNodeSid value)
Set the property corresponding toLinkstateAttribute.getPeerNodeSid()
to the specified value.LinkAttributesBuilder
setPeerSetSids(List<PeerSetSids> values)
Set the property corresponding toLinkstateAttribute.getPeerSetSids()
to the specified value.LinkAttributesBuilder
setRemoteIpv4RouterId(Ipv4RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getRemoteIpv4RouterId()
to the specified value.LinkAttributesBuilder
setRemoteIpv6RouterId(Ipv6RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getRemoteIpv6RouterId()
to the specified value.LinkAttributesBuilder
setResidualBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getResidualBandwidth()
to the specified value.LinkAttributesBuilder
setSharedRiskLinkGroups(Set<SrlgId> values)
Set the property corresponding toLinkstateAttribute.getSharedRiskLinkGroups()
to the specified value.LinkAttributesBuilder
setSrAdjIds(List<SrAdjIds> values)
Set the property corresponding toLinkstateAttribute.getSrAdjIds()
to the specified value.LinkAttributesBuilder
setSrLanAdjIds(List<SrLanAdjIds> values)
Set the property corresponding toLinkstateAttribute.getSrLanAdjIds()
to the specified value.LinkAttributesBuilder
setTeMetric(TeMetric value)
Set the property corresponding toLinkstateAttribute.getTeMetric()
to the specified value.LinkAttributesBuilder
setUnreservedBandwidth(Map<UnreservedBandwidthKey,UnreservedBandwidth> values)
Set the property corresponding toLinkstateAttribute.getUnreservedBandwidth()
to the specified value.LinkAttributesBuilder
setUtilizedBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getUtilizedBandwidth()
to the specified value.
-
-
-
Constructor Detail
-
LinkAttributesBuilder
public LinkAttributesBuilder()
Construct an empty builder.
-
LinkAttributesBuilder
public LinkAttributesBuilder(LinkstateAttribute arg)
Construct a new builder initialized from specifiedLinkstateAttribute
.- Parameters:
arg
- LinkstateAttribute from which the builder should be initialized
-
LinkAttributesBuilder
public LinkAttributesBuilder(LinkAttributes base)
Construct a builder initialized with state from specifiedLinkAttributes
.- Parameters:
base
- LinkAttributes from which the builder should be initialized
-
-
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:- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getAdminGroup
public AdministrativeGroup getAdminGroup()
Return current value associated with the property corresponding toLinkstateAttribute.getAdminGroup()
.- Returns:
- current value
-
getAvailableBandwidth
public Bandwidth getAvailableBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getAvailableBandwidth()
.- Returns:
- current value
-
getDelayVariation
public Delay getDelayVariation()
Return current value associated with the property corresponding toLinkstateAttribute.getDelayVariation()
.- Returns:
- current value
-
getLinkDelay
public Delay getLinkDelay()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkDelay()
.- Returns:
- current value
-
getLinkLoss
public Loss getLinkLoss()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkLoss()
.- Returns:
- current value
-
getLinkMinMaxDelay
public LinkMinMaxDelay getLinkMinMaxDelay()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkMinMaxDelay()
.- Returns:
- current value
-
getLinkName
public String getLinkName()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkName()
.- Returns:
- current value
-
getLinkProtection
public LinkProtectionType getLinkProtection()
Return current value associated with the property corresponding toLinkstateAttribute.getLinkProtection()
.- Returns:
- current value
-
getLocalIpv4RouterId
public Ipv4RouterIdentifier getLocalIpv4RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getLocalIpv4RouterId()
.- Returns:
- current value
-
getLocalIpv6RouterId
public Ipv6RouterIdentifier getLocalIpv6RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getLocalIpv6RouterId()
.- Returns:
- current value
-
getMaxLinkBandwidth
public Bandwidth getMaxLinkBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getMaxLinkBandwidth()
.- Returns:
- current value
-
getMaxReservableBandwidth
public Bandwidth getMaxReservableBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getMaxReservableBandwidth()
.- Returns:
- current value
-
getMetric
public Metric getMetric()
Return current value associated with the property corresponding toLinkstateAttribute.getMetric()
.- Returns:
- current value
-
getMplsProtocol
public MplsProtocolMask getMplsProtocol()
Return current value associated with the property corresponding toLinkstateAttribute.getMplsProtocol()
.- Returns:
- current value
-
getPeerAdjSid
public PeerAdjSid getPeerAdjSid()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerAdjSid()
.- Returns:
- current value
-
getPeerNodeSid
public PeerNodeSid getPeerNodeSid()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerNodeSid()
.- Returns:
- current value
-
getPeerSetSids
public List<PeerSetSids> getPeerSetSids()
Return current value associated with the property corresponding toLinkstateAttribute.getPeerSetSids()
.- Returns:
- current value
-
getRemoteIpv4RouterId
public Ipv4RouterIdentifier getRemoteIpv4RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getRemoteIpv4RouterId()
.- Returns:
- current value
-
getRemoteIpv6RouterId
public Ipv6RouterIdentifier getRemoteIpv6RouterId()
Return current value associated with the property corresponding toLinkstateAttribute.getRemoteIpv6RouterId()
.- Returns:
- current value
-
getResidualBandwidth
public Bandwidth getResidualBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getResidualBandwidth()
.- Returns:
- current value
-
getSharedRiskLinkGroups
public Set<SrlgId> getSharedRiskLinkGroups()
Return current value associated with the property corresponding toLinkstateAttribute.getSharedRiskLinkGroups()
.- Returns:
- current value
-
getSrAdjIds
public List<SrAdjIds> getSrAdjIds()
Return current value associated with the property corresponding toLinkstateAttribute.getSrAdjIds()
.- Returns:
- current value
-
getSrLanAdjIds
public List<SrLanAdjIds> getSrLanAdjIds()
Return current value associated with the property corresponding toLinkstateAttribute.getSrLanAdjIds()
.- Returns:
- current value
-
getTeMetric
public TeMetric getTeMetric()
Return current value associated with the property corresponding toLinkstateAttribute.getTeMetric()
.- Returns:
- current value
-
getUnreservedBandwidth
public Map<UnreservedBandwidthKey,UnreservedBandwidth> getUnreservedBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getUnreservedBandwidth()
.- Returns:
- current value
-
getUtilizedBandwidth
public Bandwidth getUtilizedBandwidth()
Return current value associated with the property corresponding toLinkstateAttribute.getUtilizedBandwidth()
.- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes>> E$$ augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.- Type Parameters:
E$$
- augmentation type- Parameters:
augmentationType
- augmentation type class- Returns:
- Augmentation object from this builder, or
null
if not present - Throws:
NullPointerException
- ifaugmentType
isnull
-
setAdminGroup
public LinkAttributesBuilder setAdminGroup(AdministrativeGroup value)
Set the property corresponding toLinkstateAttribute.getAdminGroup()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setAvailableBandwidth
public LinkAttributesBuilder setAvailableBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getAvailableBandwidth()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDelayVariation
public LinkAttributesBuilder setDelayVariation(Delay value)
Set the property corresponding toLinkstateAttribute.getDelayVariation()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLinkDelay
public LinkAttributesBuilder setLinkDelay(Delay value)
Set the property corresponding toLinkstateAttribute.getLinkDelay()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLinkLoss
public LinkAttributesBuilder setLinkLoss(Loss value)
Set the property corresponding toLinkstateAttribute.getLinkLoss()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLinkMinMaxDelay
public LinkAttributesBuilder setLinkMinMaxDelay(LinkMinMaxDelay value)
Set the property corresponding toLinkstateAttribute.getLinkMinMaxDelay()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLinkName
public LinkAttributesBuilder setLinkName(String value)
Set the property corresponding toLinkstateAttribute.getLinkName()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLinkProtection
public LinkAttributesBuilder setLinkProtection(LinkProtectionType value)
Set the property corresponding toLinkstateAttribute.getLinkProtection()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLocalIpv4RouterId
public LinkAttributesBuilder setLocalIpv4RouterId(Ipv4RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getLocalIpv4RouterId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLocalIpv6RouterId
public LinkAttributesBuilder setLocalIpv6RouterId(Ipv6RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getLocalIpv6RouterId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setMaxLinkBandwidth
public LinkAttributesBuilder setMaxLinkBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getMaxLinkBandwidth()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setMaxReservableBandwidth
public LinkAttributesBuilder setMaxReservableBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getMaxReservableBandwidth()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setMetric
public LinkAttributesBuilder setMetric(Metric value)
Set the property corresponding toLinkstateAttribute.getMetric()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setMplsProtocol
public LinkAttributesBuilder setMplsProtocol(MplsProtocolMask value)
Set the property corresponding toLinkstateAttribute.getMplsProtocol()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPeerAdjSid
public LinkAttributesBuilder setPeerAdjSid(PeerAdjSid value)
Set the property corresponding toLinkstateAttribute.getPeerAdjSid()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPeerNodeSid
public LinkAttributesBuilder setPeerNodeSid(PeerNodeSid value)
Set the property corresponding toLinkstateAttribute.getPeerNodeSid()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPeerSetSids
public LinkAttributesBuilder setPeerSetSids(List<PeerSetSids> values)
Set the property corresponding toLinkstateAttribute.getPeerSetSids()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setRemoteIpv4RouterId
public LinkAttributesBuilder setRemoteIpv4RouterId(Ipv4RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getRemoteIpv4RouterId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setRemoteIpv6RouterId
public LinkAttributesBuilder setRemoteIpv6RouterId(Ipv6RouterIdentifier value)
Set the property corresponding toLinkstateAttribute.getRemoteIpv6RouterId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setResidualBandwidth
public LinkAttributesBuilder setResidualBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getResidualBandwidth()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setSharedRiskLinkGroups
public LinkAttributesBuilder setSharedRiskLinkGroups(Set<SrlgId> values)
Set the property corresponding toLinkstateAttribute.getSharedRiskLinkGroups()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setSrAdjIds
public LinkAttributesBuilder setSrAdjIds(List<SrAdjIds> values)
Set the property corresponding toLinkstateAttribute.getSrAdjIds()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setSrLanAdjIds
public LinkAttributesBuilder setSrLanAdjIds(List<SrLanAdjIds> values)
Set the property corresponding toLinkstateAttribute.getSrLanAdjIds()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setTeMetric
public LinkAttributesBuilder setTeMetric(TeMetric value)
Set the property corresponding toLinkstateAttribute.getTeMetric()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setUnreservedBandwidth
public LinkAttributesBuilder setUnreservedBandwidth(Map<UnreservedBandwidthKey,UnreservedBandwidth> values)
Set the property corresponding toLinkstateAttribute.getUnreservedBandwidth()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setUtilizedBandwidth
public LinkAttributesBuilder setUtilizedBandwidth(Bandwidth value)
Set the property corresponding toLinkstateAttribute.getUtilizedBandwidth()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
addAugmentation
public LinkAttributesBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes> 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 LinkAttributesBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LinkAttributes>> 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 @NonNull LinkAttributes build()
A newLinkAttributes
instance.- Returns:
- A new
LinkAttributes
instance.
-
-