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
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<TeLspAttributes>
,org.opendaylight.yangtools.concepts.CheckedBuilder<TeLspAttributes,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class TeLspAttributesBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<TeLspAttributes>
Class that buildsTeLspAttributesBuilder
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:
TeLspAttributesBuilder createTarget(int fooXyzzy, int barBaz) { return new TeLspAttributesBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of TeLspAttributesBuilder, 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:
TeLspAttributesBuilder
,Builder
-
-
Constructor Summary
-
Method Summary
-
-
-
Constructor Detail
-
TeLspAttributesBuilder
public TeLspAttributesBuilder()
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(TspecObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(FlowSpecObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SessionAttributeObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ExplicitRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SecondaryExplicitRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(RecordRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(SecondaryRecordRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(FastRerouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(DetourObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ExcludeRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(LspAttributesObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(LspRequiredAttributesObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(ProtectionObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(AssociationObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(PrimaryPathRouteObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(AdminStatusObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(BandwidthObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(MetricObject arg)
-
TeLspAttributesBuilder
public TeLspAttributesBuilder(TeLspAttributes 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.SecondaryExplicitRouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ExcludeRouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ProtectionObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.SecondaryRecordRouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspRequiredAttributesObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RecordRouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TspecObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AssociationObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.SessionAttributeObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.PrimaryPathRouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.BandwidthObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.FastRerouteObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.FlowSpecObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.DetourObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AdminStatusObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.MetricObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspAttributesObject
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ExplicitRouteObject
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
getAdminStatusObject
public AdminStatusObject getAdminStatusObject()
-
getAssociationObject
public AssociationObject getAssociationObject()
-
getBandwidthObject
public BandwidthObject getBandwidthObject()
-
getDetourObject
public DetourObject getDetourObject()
-
getExcludeRouteObject
public ExcludeRouteObject getExcludeRouteObject()
-
getExplicitRouteObject
public ExplicitRouteObject getExplicitRouteObject()
-
getFastRerouteObject
public FastRerouteObject getFastRerouteObject()
-
getFlowSpecObject
public FlowSpecObject getFlowSpecObject()
-
getLspAttributesObject
public LspAttributesObject getLspAttributesObject()
-
getLspRequiredAttributesObject
public LspRequiredAttributesObject getLspRequiredAttributesObject()
-
getMetricObject
public MetricObject getMetricObject()
-
getPrimaryPathRouteObject
public PrimaryPathRouteObject getPrimaryPathRouteObject()
-
getProtectionObject
public ProtectionObject getProtectionObject()
-
getRecordRouteObject
public RecordRouteObject getRecordRouteObject()
-
getSecondaryExplicitRouteObject
public SecondaryExplicitRouteObject getSecondaryExplicitRouteObject()
-
getSecondaryRecordRouteObject
public SecondaryRecordRouteObject getSecondaryRecordRouteObject()
-
getSessionAttributeObject
public SessionAttributeObject getSessionAttributeObject()
-
getTspecObject
public TspecObject getTspecObject()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes>> E$$ augmentation(Class<E$$> augmentationType)
-
setAdminStatusObject
public TeLspAttributesBuilder setAdminStatusObject(AdminStatusObject value)
-
setAssociationObject
public TeLspAttributesBuilder setAssociationObject(AssociationObject value)
-
setBandwidthObject
public TeLspAttributesBuilder setBandwidthObject(BandwidthObject value)
-
setDetourObject
public TeLspAttributesBuilder setDetourObject(DetourObject value)
-
setExcludeRouteObject
public TeLspAttributesBuilder setExcludeRouteObject(ExcludeRouteObject value)
-
setExplicitRouteObject
public TeLspAttributesBuilder setExplicitRouteObject(ExplicitRouteObject value)
-
setFastRerouteObject
public TeLspAttributesBuilder setFastRerouteObject(FastRerouteObject value)
-
setFlowSpecObject
public TeLspAttributesBuilder setFlowSpecObject(FlowSpecObject value)
-
setLspAttributesObject
public TeLspAttributesBuilder setLspAttributesObject(LspAttributesObject value)
-
setLspRequiredAttributesObject
public TeLspAttributesBuilder setLspRequiredAttributesObject(LspRequiredAttributesObject value)
-
setMetricObject
public TeLspAttributesBuilder setMetricObject(MetricObject value)
-
setPrimaryPathRouteObject
public TeLspAttributesBuilder setPrimaryPathRouteObject(PrimaryPathRouteObject value)
-
setProtectionObject
public TeLspAttributesBuilder setProtectionObject(ProtectionObject value)
-
setRecordRouteObject
public TeLspAttributesBuilder setRecordRouteObject(RecordRouteObject value)
-
setSecondaryExplicitRouteObject
public TeLspAttributesBuilder setSecondaryExplicitRouteObject(SecondaryExplicitRouteObject value)
-
setSecondaryRecordRouteObject
public TeLspAttributesBuilder setSecondaryRecordRouteObject(SecondaryRecordRouteObject value)
-
setSessionAttributeObject
public TeLspAttributesBuilder setSessionAttributeObject(SessionAttributeObject value)
-
setTspecObject
public TeLspAttributesBuilder setTspecObject(TspecObject value)
-
addAugmentation
public TeLspAttributesBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes> augmentationValue)
-
removeAugmentation
public TeLspAttributesBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<TeLspAttributes>> augmentationType)
-
build
public TeLspAttributes build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<TeLspAttributes>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<TeLspAttributes,IllegalArgumentException>
-
-