Class AfiSafiBuilder
java.lang.Object
org.opendaylight.yangtools.binding.lib.AugmentableBuilder<AfiSafi,AfiSafiBuilder>
org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Mutable
@Generated("mdsal-binding-generator")
public class AfiSafiBuilder
extends org.opendaylight.yangtools.binding.lib.AugmentableBuilder<AfiSafi,AfiSafiBuilder>
Class that builds
AfiSafi 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:
AfiSafi createAfiSafi(int fooXyzzy, int barBaz) {
return new AfiSafiBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of AfiSafi, 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 opportunities, 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:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an empty builder.AfiSafiBuilder(AfiSafi base) Construct a builder initialized with state from specifiedAfiSafi.Construct a new builder initialized from specifiedIpv4LabelledUnicastGroup.Construct a new builder initialized from specifiedIpv4UnicastGroup.Construct a new builder initialized from specifiedIpv6LabelledUnicastGroup.Construct a new builder initialized from specifiedIpv6UnicastGroup.Construct a new builder initialized from specifiedL2vpnEvpnGroup.Construct a new builder initialized from specifiedL2vpnVplsGroup.Construct a new builder initialized from specifiedL3vpnIpv4MulticastGroup.Construct a new builder initialized from specifiedL3vpnIpv4UnicastGroup.Construct a new builder initialized from specifiedL3vpnIpv6MulticastGroup.Construct a new builder initialized from specifiedL3vpnIpv6UnicastGroup.Construct a new builder initialized from specifiedApplyPolicyGroup. -
Method Summary
Modifier and TypeMethodDescription@NonNull AfiSafibuild()Returns A newAfiSafiinstance.voidfieldsFrom(org.opendaylight.yangtools.binding.Grouping arg) Set fields from given grouping argument.Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseDeprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releasegetState()Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releasekey()Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releasesetAfiSafiName(AfiSafiType value) Set the property corresponding toAfiSafi.getAfiSafiName()to the specified value.setApplyPolicy(ApplyPolicy value) Set the property corresponding toApplyPolicyGroup.getApplyPolicy()to the specified value.Set the property corresponding toAfiSafi.getConfig()to the specified value.Set the property corresponding toAfiSafi.getGracefulRestart()to the specified value.Set the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()to the specified value.setIpv4Unicast(Ipv4Unicast value) Set the property corresponding toIpv4UnicastGroup.getIpv4Unicast()to the specified value.Set the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()to the specified value.setIpv6Unicast(Ipv6Unicast value) Set the property corresponding toIpv6UnicastGroup.getIpv6Unicast()to the specified value.setL2vpnEvpn(L2vpnEvpn value) Set the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()to the specified value.setL2vpnVpls(L2vpnVpls value) Set the property corresponding toL2vpnVplsGroup.getL2vpnVpls()to the specified value.Set the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()to the specified value.Set the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()to the specified value.Set the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()to the specified value.Set the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()to the specified value.Set the property corresponding toAfiSafi.getState()to the specified value.withKey(AfiSafiKey key) Set the key value corresponding toEntryObject.key()to the specified value.Methods inherited from class org.opendaylight.yangtools.binding.lib.AugmentableBuilder
addAugmentation, augmentation, augmentations, removeAugmentation
-
Constructor Details
-
AfiSafiBuilder
public AfiSafiBuilder()Construct an empty builder. -
AfiSafiBuilder
Construct a new builder initialized from specifiedApplyPolicyGroup.- Parameters:
arg- ApplyPolicyGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedIpv4UnicastGroup.- Parameters:
arg- Ipv4UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedIpv6UnicastGroup.- Parameters:
arg- Ipv6UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedIpv4LabelledUnicastGroup.- Parameters:
arg- Ipv4LabelledUnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedIpv6LabelledUnicastGroup.- Parameters:
arg- Ipv6LabelledUnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL3vpnIpv4UnicastGroup.- Parameters:
arg- L3vpnIpv4UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL3vpnIpv6UnicastGroup.- Parameters:
arg- L3vpnIpv6UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL3vpnIpv4MulticastGroup.- Parameters:
arg- L3vpnIpv4MulticastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL3vpnIpv6MulticastGroup.- Parameters:
arg- L3vpnIpv6MulticastGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL2vpnVplsGroup.- Parameters:
arg- L2vpnVplsGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a new builder initialized from specifiedL2vpnEvpnGroup.- Parameters:
arg- L2vpnEvpnGroup from which the builder should be initialized
-
AfiSafiBuilder
Construct a builder initialized with state from specifiedAfiSafi.- Parameters:
base- AfiSafi from which the builder should be initialized
-
-
Method Details
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.binding.Grouping arg) Set fields from given grouping argument. Valid argument is instance of one of following types:- Parameters:
arg- grouping object- Throws:
IllegalArgumentException- if given argument is none of valid types or has property with incompatible value
-
key
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toEntryObject.key().- Returns:
- current value
-
getAfiSafiName
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toAfiSafi.getAfiSafiName().- Returns:
- current value
-
getApplyPolicy
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toApplyPolicyGroup.getApplyPolicy().- Returns:
- current value
-
getConfig
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toAfiSafi.getConfig().- Returns:
- current value
-
getGracefulRestart
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toAfiSafi.getGracefulRestart().- Returns:
- current value
-
getIpv4LabelledUnicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast().- Returns:
- current value
-
getIpv4Unicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toIpv4UnicastGroup.getIpv4Unicast().- Returns:
- current value
-
getIpv6LabelledUnicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast().- Returns:
- current value
-
getIpv6Unicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toIpv6UnicastGroup.getIpv6Unicast().- Returns:
- current value
-
getL2vpnEvpn
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn().- Returns:
- current value
-
getL2vpnVpls
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL2vpnVplsGroup.getL2vpnVpls().- Returns:
- current value
-
getL3vpnIpv4Multicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast().- Returns:
- current value
-
getL3vpnIpv4Unicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast().- Returns:
- current value
-
getL3vpnIpv6Multicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast().- Returns:
- current value
-
getL3vpnIpv6Unicast
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast().- Returns:
- current value
-
getState
Deprecated, for removal: This API element is subject to removal in a future version.This method will not be generated in a future releaseReturn current value associated with the property corresponding toAfiSafi.getState().- Returns:
- current value
-
withKey
Set the key value corresponding toEntryObject.key()to the specified value.- Parameters:
key- desired value- Returns:
- this builder
-
setAfiSafiName
Set the property corresponding toAfiSafi.getAfiSafiName()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setApplyPolicy
Set the property corresponding toApplyPolicyGroup.getApplyPolicy()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setConfig
Set the property corresponding toAfiSafi.getConfig()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setGracefulRestart
Set the property corresponding toAfiSafi.getGracefulRestart()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setIpv4LabelledUnicast
Set the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setIpv4Unicast
Set the property corresponding toIpv4UnicastGroup.getIpv4Unicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setIpv6LabelledUnicast
Set the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setIpv6Unicast
Set the property corresponding toIpv6UnicastGroup.getIpv6Unicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL2vpnEvpn
Set the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL2vpnVpls
Set the property corresponding toL2vpnVplsGroup.getL2vpnVpls()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL3vpnIpv4Multicast
Set the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL3vpnIpv4Unicast
Set the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL3vpnIpv6Multicast
Set the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setL3vpnIpv6Unicast
Set the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setState
Set the property corresponding toAfiSafi.getState()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
build
Returns A newAfiSafiinstance.- Returns:
- A new
AfiSafiinstance
-