Package org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021
Class IgpNodeEventBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.IgpNodeEventBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<IgpNodeEvent>
,org.opendaylight.yangtools.concepts.CheckedBuilder<IgpNodeEvent,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class IgpNodeEventBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<IgpNodeEvent>
Class that buildsIgpNodeEventBuilder
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:
IgpNodeEventBuilder createTarget(int fooXyzzy, int barBaz) { return new IgpNodeEventBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of IgpNodeEventBuilder, 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:
IgpNodeEventBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description IgpNodeEventBuilder()
IgpNodeEventBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeAttributes arg)
IgpNodeEventBuilder(IgpNodeAttributes arg)
IgpNodeEventBuilder(IgpNodeEvent base)
IgpNodeEventBuilder(L3UnicastIgpTopologyType arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IgpNodeEventBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent>>
E$$augmentation(Class<E$$> augmentationType)
IgpNodeEvent
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.IgpEventType
getIgpEventType()
IgpNodeAttributes
getIgpNodeAttributes()
L3UnicastIgpTopology
getL3UnicastIgpTopology()
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId
getNodeId()
Map<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeKey,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode>
getSupportingNode()
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId
getTopologyRef()
IgpNodeEventBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent>> augmentationType)
Remove an augmentation from this builder's product.IgpNodeEventBuilder
setIgpEventType(IgpEventType value)
IgpNodeEventBuilder
setIgpNodeAttributes(IgpNodeAttributes value)
IgpNodeEventBuilder
setL3UnicastIgpTopology(L3UnicastIgpTopology value)
IgpNodeEventBuilder
setNodeId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId value)
IgpNodeEventBuilder
setSupportingNode(List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSupportingNode(Map)
instead.IgpNodeEventBuilder
setSupportingNode(Map<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeKey,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> values)
IgpNodeEventBuilder
setTopologyRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId value)
-
-
-
Constructor Detail
-
IgpNodeEventBuilder
public IgpNodeEventBuilder()
-
IgpNodeEventBuilder
public IgpNodeEventBuilder(L3UnicastIgpTopologyType arg)
-
IgpNodeEventBuilder
public IgpNodeEventBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeAttributes arg)
-
IgpNodeEventBuilder
public IgpNodeEventBuilder(IgpNodeAttributes arg)
-
IgpNodeEventBuilder
public IgpNodeEventBuilder(IgpNodeEvent 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.NodeAttributes
- 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.IgpNodeAttributes
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getIgpEventType
public IgpEventType getIgpEventType()
-
getIgpNodeAttributes
public IgpNodeAttributes getIgpNodeAttributes()
-
getL3UnicastIgpTopology
public L3UnicastIgpTopology getL3UnicastIgpTopology()
-
getNodeId
public org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId getNodeId()
-
getSupportingNode
public Map<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeKey,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> getSupportingNode()
-
getTopologyRef
public org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId getTopologyRef()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent>> E$$ augmentation(Class<E$$> augmentationType)
-
setIgpEventType
public IgpNodeEventBuilder setIgpEventType(IgpEventType value)
-
setIgpNodeAttributes
public IgpNodeEventBuilder setIgpNodeAttributes(IgpNodeAttributes value)
-
setL3UnicastIgpTopology
public IgpNodeEventBuilder setL3UnicastIgpTopology(L3UnicastIgpTopology value)
-
setNodeId
public IgpNodeEventBuilder setNodeId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId value)
-
setSupportingNode
public IgpNodeEventBuilder setSupportingNode(Map<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeKey,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> values)
-
setSupportingNode
@Deprecated(forRemoval=true) public IgpNodeEventBuilder setSupportingNode(List<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSupportingNode(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setTopologyRef
public IgpNodeEventBuilder setTopologyRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId value)
-
addAugmentation
public IgpNodeEventBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent> 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 IgpNodeEventBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<IgpNodeEvent>> 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 IgpNodeEvent build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<IgpNodeEvent>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<IgpNodeEvent,IllegalArgumentException>
-
-