Class LearntVpnVipToPortEventBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.event.data.LearntVpnVipToPortEventBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<LearntVpnVipToPortEvent>
,org.opendaylight.yangtools.concepts.CheckedBuilder<LearntVpnVipToPortEvent,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class LearntVpnVipToPortEventBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<LearntVpnVipToPortEvent>
Class that buildsLearntVpnVipToPortEventBuilder
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:
LearntVpnVipToPortEventBuilder createTarget(int fooXyzzy, int barBaz) { return new LearntVpnVipToPortEventBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of LearntVpnVipToPortEventBuilder, 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:
LearntVpnVipToPortEventBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description LearntVpnVipToPortEventBuilder()
LearntVpnVipToPortEventBuilder(LearntVpnVipToPortEvent base)
-
Method Summary
-
-
-
Constructor Detail
-
LearntVpnVipToPortEventBuilder
public LearntVpnVipToPortEventBuilder()
-
LearntVpnVipToPortEventBuilder
public LearntVpnVipToPortEventBuilder(LearntVpnVipToPortEvent base)
-
-
Method Detail
-
key
public LearntVpnVipToPortEventKey key()
-
getDestFixedip
public java.lang.String getDestFixedip()
-
getEventAction
public LearntVpnVipToPortEventAction getEventAction()
-
getLearntVpnVipEventId
public java.lang.String getLearntVpnVipEventId()
-
getMacAddress
public java.lang.String getMacAddress()
-
getPortName
public java.lang.String getPortName()
-
getSrcFixedip
public java.lang.String getSrcFixedip()
-
getVpnName
public java.lang.String getVpnName()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<LearntVpnVipToPortEvent>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public LearntVpnVipToPortEventBuilder withKey(LearntVpnVipToPortEventKey key)
-
setDestFixedip
public LearntVpnVipToPortEventBuilder setDestFixedip(java.lang.String value)
-
setEventAction
public LearntVpnVipToPortEventBuilder setEventAction(LearntVpnVipToPortEventAction value)
-
setLearntVpnVipEventId
public LearntVpnVipToPortEventBuilder setLearntVpnVipEventId(java.lang.String value)
-
setMacAddress
public LearntVpnVipToPortEventBuilder setMacAddress(java.lang.String value)
-
setPortName
public LearntVpnVipToPortEventBuilder setPortName(java.lang.String value)
-
setSrcFixedip
public LearntVpnVipToPortEventBuilder setSrcFixedip(java.lang.String value)
-
setVpnName
public LearntVpnVipToPortEventBuilder setVpnName(java.lang.String value)
-
addAugmentation
public LearntVpnVipToPortEventBuilder addAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LearntVpnVipToPortEvent>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<LearntVpnVipToPortEvent> augmentationValue)
-
removeAugmentation
public LearntVpnVipToPortEventBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LearntVpnVipToPortEvent>> augmentationType)
-
build
public LearntVpnVipToPortEvent build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<LearntVpnVipToPortEvent>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<LearntVpnVipToPortEvent,java.lang.IllegalArgumentException>
-
-