Class RedirectIpv6Builder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.ipv6.extended.community.RedirectIpv6Builder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<RedirectIpv6>
,org.opendaylight.yangtools.concepts.CheckedBuilder<RedirectIpv6,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class RedirectIpv6Builder extends Object implements org.opendaylight.yangtools.concepts.Builder<RedirectIpv6>
Class that buildsRedirectIpv6Builder
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:
RedirectIpv6Builder createTarget(int fooXyzzy, int barBaz) { return new RedirectIpv6BuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of RedirectIpv6Builder, 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:
RedirectIpv6Builder
,Builder
-
-
Constructor Summary
Constructors Constructor Description RedirectIpv6Builder()
RedirectIpv6Builder(RedirectIpv6 base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RedirectIpv6Builder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>>
E$$augmentation(Class<E$$> augmentationType)
RedirectIpv6
build()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone
getGlobalAdministrator()
org.opendaylight.yangtools.yang.common.Uint16
getLocalAdministrator()
RedirectIpv6Builder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>> augmentationType)
RedirectIpv6Builder
setGlobalAdministrator(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone value)
RedirectIpv6Builder
setLocalAdministrator(Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setLocalAdministrator(Uint16)} instead.RedirectIpv6Builder
setLocalAdministrator(org.opendaylight.yangtools.yang.common.Uint16 value)
-
-
-
Constructor Detail
-
RedirectIpv6Builder
public RedirectIpv6Builder()
-
RedirectIpv6Builder
public RedirectIpv6Builder(RedirectIpv6 base)
-
-
Method Detail
-
getGlobalAdministrator
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone getGlobalAdministrator()
-
getLocalAdministrator
public org.opendaylight.yangtools.yang.common.Uint16 getLocalAdministrator()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>> E$$ augmentation(Class<E$$> augmentationType)
-
setGlobalAdministrator
public RedirectIpv6Builder setGlobalAdministrator(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone value)
-
setLocalAdministrator
public RedirectIpv6Builder setLocalAdministrator(org.opendaylight.yangtools.yang.common.Uint16 value)
-
setLocalAdministrator
@Deprecated(forRemoval=true) public RedirectIpv6Builder setLocalAdministrator(Integer value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setLocalAdministrator(Uint16)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
addAugmentation
public RedirectIpv6Builder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6> augmentationValue)
-
removeAugmentation
public RedirectIpv6Builder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<RedirectIpv6>> augmentationType)
-
build
public RedirectIpv6 build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<RedirectIpv6>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<RedirectIpv6,IllegalArgumentException>
-
-