Class ItmConfigBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.ItmConfigBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<ItmConfig>
,org.opendaylight.yangtools.concepts.CheckedBuilder<ItmConfig,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class ItmConfigBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<ItmConfig>
Class that buildsItmConfigBuilder
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:
ItmConfigBuilder createTarget(int fooXyzzy, int barBaz) { return new ItmConfigBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of ItmConfigBuilder, 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:
ItmConfigBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description ItmConfigBuilder()
ItmConfigBuilder(ItmConfig base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ItmConfigBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
ItmConfig
build()
org.opendaylight.yangtools.yang.common.Uint16
getBatchInterval()
org.opendaylight.yangtools.yang.common.Uint16
getBatchSize()
java.lang.String
getDefaultTunnelTos()
java.lang.Boolean
getDefTzEnabled()
java.lang.String
getDefTzTunnelType()
java.lang.Boolean
getGpeExtensionEnabled()
java.lang.String
getPortname()
java.util.Map<TunnelAggregationKey,TunnelAggregation>
getTunnelAggregation()
java.lang.Boolean
getUseOfTunnels()
org.opendaylight.yangtools.yang.common.Uint16
getVlanId()
java.lang.Boolean
isDefTzEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.java.lang.Boolean
isGpeExtensionEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.java.lang.Boolean
isUseOfTunnels()
Deprecated, for removal: This API element is subject to removal in a future version.ItmConfigBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>> augmentationType)
Remove an augmentation from this builder's product.ItmConfigBuilder
setBatchInterval(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetBatchInterval(Uint16)
instead.ItmConfigBuilder
setBatchInterval(org.opendaylight.yangtools.yang.common.Uint16 value)
ItmConfigBuilder
setBatchSize(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetBatchSize(Uint16)
instead.ItmConfigBuilder
setBatchSize(org.opendaylight.yangtools.yang.common.Uint16 value)
ItmConfigBuilder
setDefaultTunnelTos(java.lang.String value)
ItmConfigBuilder
setDefTzEnabled(java.lang.Boolean value)
ItmConfigBuilder
setDefTzTunnelType(java.lang.String value)
ItmConfigBuilder
setGpeExtensionEnabled(java.lang.Boolean value)
ItmConfigBuilder
setPortname(java.lang.String value)
ItmConfigBuilder
setTunnelAggregation(java.util.List<TunnelAggregation> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTunnelAggregation(Map)
instead.ItmConfigBuilder
setTunnelAggregation(java.util.Map<TunnelAggregationKey,TunnelAggregation> values)
ItmConfigBuilder
setUseOfTunnels(java.lang.Boolean value)
ItmConfigBuilder
setVlanId(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVlanId(Uint16)
instead.ItmConfigBuilder
setVlanId(org.opendaylight.yangtools.yang.common.Uint16 value)
-
-
-
Constructor Detail
-
ItmConfigBuilder
public ItmConfigBuilder()
-
ItmConfigBuilder
public ItmConfigBuilder(ItmConfig base)
-
-
Method Detail
-
getBatchInterval
public org.opendaylight.yangtools.yang.common.Uint16 getBatchInterval()
-
getBatchSize
public org.opendaylight.yangtools.yang.common.Uint16 getBatchSize()
-
getDefTzEnabled
public java.lang.Boolean getDefTzEnabled()
-
isDefTzEnabled
@Deprecated(forRemoval=true) public final java.lang.Boolean isDefTzEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getDefTzTunnelType
public java.lang.String getDefTzTunnelType()
-
getDefaultTunnelTos
public java.lang.String getDefaultTunnelTos()
-
getGpeExtensionEnabled
public java.lang.Boolean getGpeExtensionEnabled()
-
isGpeExtensionEnabled
@Deprecated(forRemoval=true) public final java.lang.Boolean isGpeExtensionEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getPortname
public java.lang.String getPortname()
-
getTunnelAggregation
public java.util.Map<TunnelAggregationKey,TunnelAggregation> getTunnelAggregation()
-
getUseOfTunnels
public java.lang.Boolean getUseOfTunnels()
-
isUseOfTunnels
@Deprecated(forRemoval=true) public final java.lang.Boolean isUseOfTunnels()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getVlanId
public org.opendaylight.yangtools.yang.common.Uint16 getVlanId()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
setBatchInterval
public ItmConfigBuilder setBatchInterval(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setBatchInterval
@Deprecated(forRemoval=true) public ItmConfigBuilder setBatchInterval(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetBatchInterval(Uint16)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setBatchSize
public ItmConfigBuilder setBatchSize(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setBatchSize
@Deprecated(forRemoval=true) public ItmConfigBuilder setBatchSize(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetBatchSize(Uint16)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setDefTzEnabled
public ItmConfigBuilder setDefTzEnabled(java.lang.Boolean value)
-
setDefTzTunnelType
public ItmConfigBuilder setDefTzTunnelType(java.lang.String value)
-
setDefaultTunnelTos
public ItmConfigBuilder setDefaultTunnelTos(java.lang.String value)
-
setGpeExtensionEnabled
public ItmConfigBuilder setGpeExtensionEnabled(java.lang.Boolean value)
-
setPortname
public ItmConfigBuilder setPortname(java.lang.String value)
-
setTunnelAggregation
public ItmConfigBuilder setTunnelAggregation(java.util.Map<TunnelAggregationKey,TunnelAggregation> values)
-
setTunnelAggregation
@Deprecated(forRemoval=true) public ItmConfigBuilder setTunnelAggregation(java.util.List<TunnelAggregation> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTunnelAggregation(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:
java.lang.IllegalArgumentException
- if the list contains entries with the same keyjava.lang.NullPointerException
- if the list contains a null entry
-
setUseOfTunnels
public ItmConfigBuilder setUseOfTunnels(java.lang.Boolean value)
-
setVlanId
public ItmConfigBuilder setVlanId(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setVlanId
@Deprecated(forRemoval=true) public ItmConfigBuilder setVlanId(java.lang.Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVlanId(Uint16)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
addAugmentation
public ItmConfigBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig> 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 ItmConfigBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>> 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
-
-