Class 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 builds ItmConfigBuilder 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 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()
      • 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.
        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.
        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)
      • 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.
        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 key
        java.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.
        Use setVlanId(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 - if augmentation 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
      • build

        public ItmConfig build()
        Specified by:
        build in interface org.opendaylight.yangtools.concepts.Builder<ItmConfig>
        Specified by:
        build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<ItmConfig,​java.lang.IllegalArgumentException>