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>

    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()
      • getDefTzTunnelType

        public java.lang.String getDefTzTunnelType()
      • getDefaultTunnelTos

        public java.lang.String getDefaultTunnelTos()
      • getPortname

        public java.lang.String getPortname()
      • getTunnelAggregation

        public java.util.List<TunnelAggregation> getTunnelAggregation()
      • getVlanId

        public org.opendaylight.yangtools.yang.common.Uint16 getVlanId()
      • isDefTzEnabled

        public java.lang.Boolean isDefTzEnabled()
      • isGpeExtensionEnabled

        public java.lang.Boolean isGpeExtensionEnabled()
      • isUseOfTunnels

        public java.lang.Boolean isUseOfTunnels()
      • 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.
        Use {#link setBatchInterval(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.
        Use {#link setBatchSize(Uint16)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setDefTzTunnelType

        public ItmConfigBuilder setDefTzTunnelType​(java.lang.String value)
      • setDefaultTunnelTos

        public ItmConfigBuilder setDefaultTunnelTos​(java.lang.String 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 {#link setVlanId(Uint16)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setDefTzEnabled

        public ItmConfigBuilder setDefTzEnabled​(java.lang.Boolean value)
      • setGpeExtensionEnabled

        public ItmConfigBuilder setGpeExtensionEnabled​(java.lang.Boolean value)
      • setUseOfTunnels

        public ItmConfigBuilder setUseOfTunnels​(java.lang.Boolean value)
      • addAugmentation

        public ItmConfigBuilder addAugmentation​(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>> augmentationType,
                                                org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig> augmentationValue)
      • removeAugmentation

        public ItmConfigBuilder removeAugmentation​(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<ItmConfig>> augmentationType)
      • 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>