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