Class TeLspAttributesBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.linkstate.path.attribute.link.state.attribute.te.lsp.attributes._case.TeLspAttributesBuilder
-
@Generated("mdsal-binding-generator") public class TeLspAttributesBuilder extends Object
Class that buildsTeLspAttributes
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:
TeLspAttributes createTeLspAttributes(int fooXyzzy, int barBaz) { return new TeLspAttributesBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of TeLspAttributes, 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:
TeLspAttributes
- 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 TeLspAttributesBuilder()
Construct an empty builder.TeLspAttributesBuilder(TeLspAttributes base)
Construct a builder initialized with state from specifiedTeLspAttributes
.TeLspAttributesBuilder(AdminStatusObject arg)
Construct a new builder initialized from specifiedAdminStatusObject
.TeLspAttributesBuilder(AssociationObject arg)
Construct a new builder initialized from specifiedAssociationObject
.TeLspAttributesBuilder(BandwidthObject arg)
Construct a new builder initialized from specifiedBandwidthObject
.TeLspAttributesBuilder(DetourObject arg)
Construct a new builder initialized from specifiedDetourObject
.TeLspAttributesBuilder(ExcludeRouteObject arg)
Construct a new builder initialized from specifiedExcludeRouteObject
.TeLspAttributesBuilder(ExplicitRouteObject arg)
Construct a new builder initialized from specifiedExplicitRouteObject
.TeLspAttributesBuilder(FastRerouteObject arg)
Construct a new builder initialized from specifiedFastRerouteObject
.TeLspAttributesBuilder(FlowSpecObject arg)
Construct a new builder initialized from specifiedFlowSpecObject
.TeLspAttributesBuilder(LspAttributesObject arg)
Construct a new builder initialized from specifiedLspAttributesObject
.TeLspAttributesBuilder(LspRequiredAttributesObject arg)
Construct a new builder initialized from specifiedLspRequiredAttributesObject
.TeLspAttributesBuilder(MetricObject arg)
Construct a new builder initialized from specifiedMetricObject
.TeLspAttributesBuilder(PrimaryPathRouteObject arg)
Construct a new builder initialized from specifiedPrimaryPathRouteObject
.TeLspAttributesBuilder(ProtectionObject arg)
Construct a new builder initialized from specifiedProtectionObject
.TeLspAttributesBuilder(RecordRouteObject arg)
Construct a new builder initialized from specifiedRecordRouteObject
.TeLspAttributesBuilder(SecondaryExplicitRouteObject arg)
Construct a new builder initialized from specifiedSecondaryExplicitRouteObject
.TeLspAttributesBuilder(SecondaryRecordRouteObject arg)
Construct a new builder initialized from specifiedSecondaryRecordRouteObject
.TeLspAttributesBuilder(SessionAttributeObject arg)
Construct a new builder initialized from specifiedSessionAttributeObject
.TeLspAttributesBuilder(TspecObject arg)
Construct a new builder initialized from specifiedTspecObject
.
-
Method Summary
-
-
-
Constructor Detail
-
TeLspAttributesBuilder
public TeLspAttributesBuilder()
Construct an empty builder.
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(TspecObject arg)
Construct a new builder initialized from specifiedTspecObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TspecObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(FlowSpecObject arg)
Construct a new builder initialized from specifiedFlowSpecObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.FlowSpecObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SessionAttributeObject arg)
Construct a new builder initialized from specifiedSessionAttributeObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.SessionAttributeObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ExplicitRouteObject arg)
Construct a new builder initialized from specifiedExplicitRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ExplicitRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SecondaryExplicitRouteObject arg)
Construct a new builder initialized from specifiedSecondaryExplicitRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.SecondaryExplicitRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(RecordRouteObject arg)
Construct a new builder initialized from specifiedRecordRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RecordRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SecondaryRecordRouteObject arg)
Construct a new builder initialized from specifiedSecondaryRecordRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.SecondaryRecordRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(FastRerouteObject arg)
Construct a new builder initialized from specifiedFastRerouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.FastRerouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(DetourObject arg)
Construct a new builder initialized from specifiedDetourObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.DetourObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ExcludeRouteObject arg)
Construct a new builder initialized from specifiedExcludeRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ExcludeRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(LspAttributesObject arg)
Construct a new builder initialized from specifiedLspAttributesObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspAttributesObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(LspRequiredAttributesObject arg)
Construct a new builder initialized from specifiedLspRequiredAttributesObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspRequiredAttributesObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ProtectionObject arg)
Construct a new builder initialized from specifiedProtectionObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ProtectionObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(AssociationObject arg)
Construct a new builder initialized from specifiedAssociationObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AssociationObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(PrimaryPathRouteObject arg)
Construct a new builder initialized from specifiedPrimaryPathRouteObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.PrimaryPathRouteObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(AdminStatusObject arg)
Construct a new builder initialized from specifiedAdminStatusObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AdminStatusObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(BandwidthObject arg)
Construct a new builder initialized from specifiedBandwidthObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.BandwidthObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(MetricObject arg)
Construct a new builder initialized from specifiedMetricObject
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.MetricObject from which the builder should be initialized
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(TeLspAttributes base)
Construct a builder initialized with state from specifiedTeLspAttributes
.- Parameters:
base
- TeLspAttributes 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:SecondaryExplicitRouteObject
ExcludeRouteObject
ProtectionObject
SecondaryRecordRouteObject
LspRequiredAttributesObject
RecordRouteObject
TspecObject
AssociationObject
SessionAttributeObject
PrimaryPathRouteObject
BandwidthObject
FastRerouteObject
FlowSpecObject
DetourObject
AdminStatusObject
MetricObject
LspAttributesObject
ExplicitRouteObject
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getAdminStatusObject
public AdminStatusObject getAdminStatusObject()
Return current value associated with the property corresponding toAdminStatusObject.getAdminStatusObject()
.- Returns:
- current value
-
getAssociationObject
public AssociationObject getAssociationObject()
Return current value associated with the property corresponding toAssociationObject.getAssociationObject()
.- Returns:
- current value
-
getBandwidthObject
public BandwidthObject getBandwidthObject()
Return current value associated with the property corresponding toBandwidthObject.getBandwidthObject()
.- Returns:
- current value
-
getDetourObject
public DetourObject getDetourObject()
Return current value associated with the property corresponding toDetourObject.getDetourObject()
.- Returns:
- current value
-
getExcludeRouteObject
public ExcludeRouteObject getExcludeRouteObject()
Return current value associated with the property corresponding toExcludeRouteObject.getExcludeRouteObject()
.- Returns:
- current value
-
getExplicitRouteObject
public ExplicitRouteObject getExplicitRouteObject()
Return current value associated with the property corresponding toExplicitRouteObject.getExplicitRouteObject()
.- Returns:
- current value
-
getFastRerouteObject
public FastRerouteObject getFastRerouteObject()
Return current value associated with the property corresponding toFastRerouteObject.getFastRerouteObject()
.- Returns:
- current value
-
getFlowSpecObject
public FlowSpecObject getFlowSpecObject()
Return current value associated with the property corresponding toFlowSpecObject.getFlowSpecObject()
.- Returns:
- current value
-
getLspAttributesObject
public LspAttributesObject getLspAttributesObject()
Return current value associated with the property corresponding toLspAttributesObject.getLspAttributesObject()
.- Returns:
- current value
-
getLspRequiredAttributesObject
public LspRequiredAttributesObject getLspRequiredAttributesObject()
Return current value associated with the property corresponding toLspRequiredAttributesObject.getLspRequiredAttributesObject()
.- Returns:
- current value
-
getMetricObject
public MetricObject getMetricObject()
Return current value associated with the property corresponding toMetricObject.getMetricObject()
.- Returns:
- current value
-
getPrimaryPathRouteObject
public PrimaryPathRouteObject getPrimaryPathRouteObject()
Return current value associated with the property corresponding toPrimaryPathRouteObject.getPrimaryPathRouteObject()
.- Returns:
- current value
-
getProtectionObject
public ProtectionObject getProtectionObject()
Return current value associated with the property corresponding toProtectionObject.getProtectionObject()
.- Returns:
- current value
-
getRecordRouteObject
public RecordRouteObject getRecordRouteObject()
Return current value associated with the property corresponding toRecordRouteObject.getRecordRouteObject()
.- Returns:
- current value
-
getSecondaryExplicitRouteObject
public SecondaryExplicitRouteObject getSecondaryExplicitRouteObject()
Return current value associated with the property corresponding toSecondaryExplicitRouteObject.getSecondaryExplicitRouteObject()
.- Returns:
- current value
-
getSecondaryRecordRouteObject
public SecondaryRecordRouteObject getSecondaryRecordRouteObject()
Return current value associated with the property corresponding toSecondaryRecordRouteObject.getSecondaryRecordRouteObject()
.- Returns:
- current value
-
getSessionAttributeObject
public SessionAttributeObject getSessionAttributeObject()
Return current value associated with the property corresponding toSessionAttributeObject.getSessionAttributeObject()
.- Returns:
- current value
-
getTspecObject
public TspecObject getTspecObject()
Return current value associated with the property corresponding toTspecObject.getTspecObject()
.- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes>> 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
-
setAdminStatusObject
public TeLspAttributesBuilder setAdminStatusObject(AdminStatusObject value)
Set the property corresponding toAdminStatusObject.getAdminStatusObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setAssociationObject
public TeLspAttributesBuilder setAssociationObject(AssociationObject value)
Set the property corresponding toAssociationObject.getAssociationObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBandwidthObject
public TeLspAttributesBuilder setBandwidthObject(BandwidthObject value)
Set the property corresponding toBandwidthObject.getBandwidthObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDetourObject
public TeLspAttributesBuilder setDetourObject(DetourObject value)
Set the property corresponding toDetourObject.getDetourObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setExcludeRouteObject
public TeLspAttributesBuilder setExcludeRouteObject(ExcludeRouteObject value)
Set the property corresponding toExcludeRouteObject.getExcludeRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setExplicitRouteObject
public TeLspAttributesBuilder setExplicitRouteObject(ExplicitRouteObject value)
Set the property corresponding toExplicitRouteObject.getExplicitRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFastRerouteObject
public TeLspAttributesBuilder setFastRerouteObject(FastRerouteObject value)
Set the property corresponding toFastRerouteObject.getFastRerouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFlowSpecObject
public TeLspAttributesBuilder setFlowSpecObject(FlowSpecObject value)
Set the property corresponding toFlowSpecObject.getFlowSpecObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLspAttributesObject
public TeLspAttributesBuilder setLspAttributesObject(LspAttributesObject value)
Set the property corresponding toLspAttributesObject.getLspAttributesObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLspRequiredAttributesObject
public TeLspAttributesBuilder setLspRequiredAttributesObject(LspRequiredAttributesObject value)
Set the property corresponding toLspRequiredAttributesObject.getLspRequiredAttributesObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setMetricObject
public TeLspAttributesBuilder setMetricObject(MetricObject value)
Set the property corresponding toMetricObject.getMetricObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPrimaryPathRouteObject
public TeLspAttributesBuilder setPrimaryPathRouteObject(PrimaryPathRouteObject value)
Set the property corresponding toPrimaryPathRouteObject.getPrimaryPathRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setProtectionObject
public TeLspAttributesBuilder setProtectionObject(ProtectionObject value)
Set the property corresponding toProtectionObject.getProtectionObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setRecordRouteObject
public TeLspAttributesBuilder setRecordRouteObject(RecordRouteObject value)
Set the property corresponding toRecordRouteObject.getRecordRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setSecondaryExplicitRouteObject
public TeLspAttributesBuilder setSecondaryExplicitRouteObject(SecondaryExplicitRouteObject value)
Set the property corresponding toSecondaryExplicitRouteObject.getSecondaryExplicitRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setSecondaryRecordRouteObject
public TeLspAttributesBuilder setSecondaryRecordRouteObject(SecondaryRecordRouteObject value)
Set the property corresponding toSecondaryRecordRouteObject.getSecondaryRecordRouteObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setSessionAttributeObject
public TeLspAttributesBuilder setSessionAttributeObject(SessionAttributeObject value)
Set the property corresponding toSessionAttributeObject.getSessionAttributeObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTspecObject
public TeLspAttributesBuilder setTspecObject(TspecObject value)
Set the property corresponding toTspecObject.getTspecObject()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
addAugmentation
public TeLspAttributesBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes> 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 TeLspAttributesBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes>> 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 TeLspAttributes build()
A newTeLspAttributes
instance.- Returns:
- A new
TeLspAttributes
instance.
-
-