Package org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021
Class TerminationPointEventBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.TerminationPointEventBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<TerminationPointEvent>
,org.opendaylight.yangtools.concepts.CheckedBuilder<TerminationPointEvent,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class TerminationPointEventBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<TerminationPointEvent>
Class that buildsTerminationPointEventBuilder
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:
TerminationPointEventBuilder createTarget(int fooXyzzy, int barBaz) { return new TerminationPointEventBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of TerminationPointEventBuilder, 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:
TerminationPointEventBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description TerminationPointEventBuilder()
TerminationPointEventBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpAttributes arg)
TerminationPointEventBuilder(IgpTerminationPointAttributes arg)
TerminationPointEventBuilder(L3UnicastIgpTopologyType arg)
TerminationPointEventBuilder(TerminationPointEvent base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TerminationPointEventBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent>>
E$$augmentation(Class<E$$> augmentationType)
TerminationPointEvent
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.IgpEventType
getIgpEventType()
IgpTerminationPointAttributes
getIgpTerminationPointAttributes()
L3UnicastIgpTopology
getL3UnicastIgpTopology()
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId
getNodeRef()
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId
getTopologyRef()
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId
getTpId()
List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId>
getTpRef()
TerminationPointEventBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent>> augmentationType)
Remove an augmentation from this builder's product.TerminationPointEventBuilder
setIgpEventType(IgpEventType value)
TerminationPointEventBuilder
setIgpTerminationPointAttributes(IgpTerminationPointAttributes value)
TerminationPointEventBuilder
setL3UnicastIgpTopology(L3UnicastIgpTopology value)
TerminationPointEventBuilder
setNodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId value)
TerminationPointEventBuilder
setTopologyRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId value)
TerminationPointEventBuilder
setTpId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId value)
TerminationPointEventBuilder
setTpRef(List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId> values)
-
-
-
Constructor Detail
-
TerminationPointEventBuilder
public TerminationPointEventBuilder()
-
TerminationPointEventBuilder
public TerminationPointEventBuilder(L3UnicastIgpTopologyType arg)
-
TerminationPointEventBuilder
public TerminationPointEventBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpAttributes arg)
-
TerminationPointEventBuilder
public TerminationPointEventBuilder(IgpTerminationPointAttributes arg)
-
TerminationPointEventBuilder
public TerminationPointEventBuilder(TerminationPointEvent 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.tbd.params.xml.ns.yang.network.topology.rev131021.TpAttributes
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.L3UnicastIgpTopologyType
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.IgpTerminationPointAttributes
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getIgpEventType
public IgpEventType getIgpEventType()
-
getIgpTerminationPointAttributes
public IgpTerminationPointAttributes getIgpTerminationPointAttributes()
-
getL3UnicastIgpTopology
public L3UnicastIgpTopology getL3UnicastIgpTopology()
-
getNodeRef
public org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId getNodeRef()
-
getTopologyRef
public org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId getTopologyRef()
-
getTpId
public org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId getTpId()
-
getTpRef
public List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId> getTpRef()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent>> E$$ augmentation(Class<E$$> augmentationType)
-
setIgpEventType
public TerminationPointEventBuilder setIgpEventType(IgpEventType value)
-
setIgpTerminationPointAttributes
public TerminationPointEventBuilder setIgpTerminationPointAttributes(IgpTerminationPointAttributes value)
-
setL3UnicastIgpTopology
public TerminationPointEventBuilder setL3UnicastIgpTopology(L3UnicastIgpTopology value)
-
setNodeRef
public TerminationPointEventBuilder setNodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId value)
-
setTopologyRef
public TerminationPointEventBuilder setTopologyRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId value)
-
setTpId
public TerminationPointEventBuilder setTpId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId value)
-
setTpRef
public TerminationPointEventBuilder setTpRef(List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId> values)
-
addAugmentation
public TerminationPointEventBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent> 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 TerminationPointEventBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<TerminationPointEvent>> 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 TerminationPointEvent build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<TerminationPointEvent>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<TerminationPointEvent,IllegalArgumentException>
-
-