Class StateTunnelListBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelListBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<StateTunnelList>
,org.opendaylight.yangtools.concepts.CheckedBuilder<StateTunnelList,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class StateTunnelListBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<StateTunnelList>
Class that buildsStateTunnelListBuilder
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:
StateTunnelListBuilder createTarget(int fooXyzzy, int barBaz) { return new StateTunnelListBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of StateTunnelListBuilder, 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:
StateTunnelListBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description StateTunnelListBuilder()
StateTunnelListBuilder(StateTunnelList base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StateTunnelListBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
StateTunnelList
build()
DstInfo
getDstInfo()
org.opendaylight.yangtools.yang.common.Uint16
getIfIndex()
TunnelOperStatus
getOperState()
java.lang.String
getPortNumber()
SrcInfo
getSrcInfo()
java.lang.Class<? extends TunnelTypeBase>
getTransportType()
java.lang.String
getTunnelInterfaceName()
java.lang.Boolean
getTunnelState()
java.lang.Boolean
isTunnelState()
Deprecated, for removal: This API element is subject to removal in a future version.StateTunnelListKey
key()
StateTunnelListBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList>> augmentationType)
Remove an augmentation from this builder's product.StateTunnelListBuilder
setDstInfo(DstInfo value)
StateTunnelListBuilder
setIfIndex(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetIfIndex(Uint16)
instead.StateTunnelListBuilder
setIfIndex(org.opendaylight.yangtools.yang.common.Uint16 value)
StateTunnelListBuilder
setOperState(TunnelOperStatus value)
StateTunnelListBuilder
setPortNumber(java.lang.String value)
StateTunnelListBuilder
setSrcInfo(SrcInfo value)
StateTunnelListBuilder
setTransportType(java.lang.Class<? extends TunnelTypeBase> value)
StateTunnelListBuilder
setTunnelInterfaceName(java.lang.String value)
StateTunnelListBuilder
setTunnelState(java.lang.Boolean value)
StateTunnelListBuilder
withKey(StateTunnelListKey key)
-
-
-
Constructor Detail
-
StateTunnelListBuilder
public StateTunnelListBuilder()
-
StateTunnelListBuilder
public StateTunnelListBuilder(StateTunnelList base)
-
-
Method Detail
-
key
public StateTunnelListKey key()
-
getDstInfo
public DstInfo getDstInfo()
-
getIfIndex
public org.opendaylight.yangtools.yang.common.Uint16 getIfIndex()
-
getOperState
public TunnelOperStatus getOperState()
-
getPortNumber
public java.lang.String getPortNumber()
-
getSrcInfo
public SrcInfo getSrcInfo()
-
getTransportType
public java.lang.Class<? extends TunnelTypeBase> getTransportType()
-
getTunnelInterfaceName
public java.lang.String getTunnelInterfaceName()
-
getTunnelState
public java.lang.Boolean getTunnelState()
-
isTunnelState
@Deprecated(forRemoval=true) public final java.lang.Boolean isTunnelState()
Deprecated, for removal: This API element is subject to removal in a future version.
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public StateTunnelListBuilder withKey(StateTunnelListKey key)
-
setDstInfo
public StateTunnelListBuilder setDstInfo(DstInfo value)
-
setIfIndex
public StateTunnelListBuilder setIfIndex(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setIfIndex
@Deprecated(forRemoval=true) public StateTunnelListBuilder setIfIndex(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetIfIndex(Uint16)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setOperState
public StateTunnelListBuilder setOperState(TunnelOperStatus value)
-
setPortNumber
public StateTunnelListBuilder setPortNumber(java.lang.String value)
-
setSrcInfo
public StateTunnelListBuilder setSrcInfo(SrcInfo value)
-
setTransportType
public StateTunnelListBuilder setTransportType(java.lang.Class<? extends TunnelTypeBase> value)
-
setTunnelInterfaceName
public StateTunnelListBuilder setTunnelInterfaceName(java.lang.String value)
-
setTunnelState
public StateTunnelListBuilder setTunnelState(java.lang.Boolean value)
-
addAugmentation
public StateTunnelListBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
java.lang.NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public StateTunnelListBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<StateTunnelList>> 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 StateTunnelList build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<StateTunnelList>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<StateTunnelList,java.lang.IllegalArgumentException>
-
-