Class AfiSafiBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafiBuilder
-
@Generated("mdsal-binding-generator") public class AfiSafiBuilder extends Object
Class that buildsAfiSafi
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:
AfiSafi
- 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
-
-
Constructor Summary
Constructors Constructor Description AfiSafiBuilder()
Construct an empty builder.AfiSafiBuilder(AfiSafi base)
Construct a builder initialized with state from specifiedAfiSafi
.AfiSafiBuilder(Ipv4LabelledUnicastGroup arg)
Construct a new builder initialized from specifiedIpv4LabelledUnicastGroup
.AfiSafiBuilder(Ipv4UnicastGroup arg)
Construct a new builder initialized from specifiedIpv4UnicastGroup
.AfiSafiBuilder(Ipv6LabelledUnicastGroup arg)
Construct a new builder initialized from specifiedIpv6LabelledUnicastGroup
.AfiSafiBuilder(Ipv6UnicastGroup arg)
Construct a new builder initialized from specifiedIpv6UnicastGroup
.AfiSafiBuilder(L2vpnEvpnGroup arg)
Construct a new builder initialized from specifiedL2vpnEvpnGroup
.AfiSafiBuilder(L2vpnVplsGroup arg)
Construct a new builder initialized from specifiedL2vpnVplsGroup
.AfiSafiBuilder(L3vpnIpv4MulticastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv4MulticastGroup
.AfiSafiBuilder(L3vpnIpv4UnicastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv4UnicastGroup
.AfiSafiBuilder(L3vpnIpv6MulticastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv6MulticastGroup
.AfiSafiBuilder(L3vpnIpv6UnicastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv6UnicastGroup
.AfiSafiBuilder(ApplyPolicyGroup arg)
Construct a new builder initialized from specifiedApplyPolicyGroup
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AfiSafiBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi>>
E$$augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.@NonNull AfiSafi
build()
A newAfiSafi
instance.void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.Class<? extends AfiSafiType>
getAfiSafiName()
Return current value associated with the property corresponding toAfiSafi.getAfiSafiName()
.ApplyPolicy
getApplyPolicy()
Return current value associated with the property corresponding toApplyPolicyGroup.getApplyPolicy()
.Config
getConfig()
Return current value associated with the property corresponding toAfiSafi.getConfig()
.GracefulRestart
getGracefulRestart()
Return current value associated with the property corresponding toAfiSafi.getGracefulRestart()
.Ipv4LabelledUnicast
getIpv4LabelledUnicast()
Return current value associated with the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()
.Ipv4Unicast
getIpv4Unicast()
Return current value associated with the property corresponding toIpv4UnicastGroup.getIpv4Unicast()
.Ipv6LabelledUnicast
getIpv6LabelledUnicast()
Return current value associated with the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()
.Ipv6Unicast
getIpv6Unicast()
Return current value associated with the property corresponding toIpv6UnicastGroup.getIpv6Unicast()
.L2vpnEvpn
getL2vpnEvpn()
Return current value associated with the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()
.L2vpnVpls
getL2vpnVpls()
Return current value associated with the property corresponding toL2vpnVplsGroup.getL2vpnVpls()
.L3vpnIpv4Multicast
getL3vpnIpv4Multicast()
Return current value associated with the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()
.L3vpnIpv4Unicast
getL3vpnIpv4Unicast()
Return current value associated with the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()
.L3vpnIpv6Multicast
getL3vpnIpv6Multicast()
Return current value associated with the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()
.L3vpnIpv6Unicast
getL3vpnIpv6Unicast()
Return current value associated with the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()
.State
getState()
Return current value associated with the property corresponding toAfiSafi.getState()
.AfiSafiKey
key()
Return current value associated with the property corresponding toAfiSafi.key()
.AfiSafiBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi>> augmentationType)
Remove an augmentation from this builder's product.AfiSafiBuilder
setAfiSafiName(Class<? extends AfiSafiType> value)
Set the property corresponding toAfiSafi.getAfiSafiName()
to the specified value.AfiSafiBuilder
setApplyPolicy(ApplyPolicy value)
Set the property corresponding toApplyPolicyGroup.getApplyPolicy()
to the specified value.AfiSafiBuilder
setConfig(Config value)
Set the property corresponding toAfiSafi.getConfig()
to the specified value.AfiSafiBuilder
setGracefulRestart(GracefulRestart value)
Set the property corresponding toAfiSafi.getGracefulRestart()
to the specified value.AfiSafiBuilder
setIpv4LabelledUnicast(Ipv4LabelledUnicast value)
Set the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()
to the specified value.AfiSafiBuilder
setIpv4Unicast(Ipv4Unicast value)
Set the property corresponding toIpv4UnicastGroup.getIpv4Unicast()
to the specified value.AfiSafiBuilder
setIpv6LabelledUnicast(Ipv6LabelledUnicast value)
Set the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()
to the specified value.AfiSafiBuilder
setIpv6Unicast(Ipv6Unicast value)
Set the property corresponding toIpv6UnicastGroup.getIpv6Unicast()
to the specified value.AfiSafiBuilder
setL2vpnEvpn(L2vpnEvpn value)
Set the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()
to the specified value.AfiSafiBuilder
setL2vpnVpls(L2vpnVpls value)
Set the property corresponding toL2vpnVplsGroup.getL2vpnVpls()
to the specified value.AfiSafiBuilder
setL3vpnIpv4Multicast(L3vpnIpv4Multicast value)
Set the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()
to the specified value.AfiSafiBuilder
setL3vpnIpv4Unicast(L3vpnIpv4Unicast value)
Set the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()
to the specified value.AfiSafiBuilder
setL3vpnIpv6Multicast(L3vpnIpv6Multicast value)
Set the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()
to the specified value.AfiSafiBuilder
setL3vpnIpv6Unicast(L3vpnIpv6Unicast value)
Set the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()
to the specified value.AfiSafiBuilder
setState(State value)
Set the property corresponding toAfiSafi.getState()
to the specified value.AfiSafiBuilder
withKey(AfiSafiKey key)
-
-
-
Constructor Detail
-
AfiSafiBuilder
public AfiSafiBuilder()
Construct an empty builder.
-
AfiSafiBuilder
public AfiSafiBuilder(ApplyPolicyGroup arg)
Construct a new builder initialized from specifiedApplyPolicyGroup
.- Parameters:
arg
- ApplyPolicyGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(Ipv4UnicastGroup arg)
Construct a new builder initialized from specifiedIpv4UnicastGroup
.- Parameters:
arg
- Ipv4UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(Ipv6UnicastGroup arg)
Construct a new builder initialized from specifiedIpv6UnicastGroup
.- Parameters:
arg
- Ipv6UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(Ipv4LabelledUnicastGroup arg)
Construct a new builder initialized from specifiedIpv4LabelledUnicastGroup
.- Parameters:
arg
- Ipv4LabelledUnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(Ipv6LabelledUnicastGroup arg)
Construct a new builder initialized from specifiedIpv6LabelledUnicastGroup
.- Parameters:
arg
- Ipv6LabelledUnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L3vpnIpv4UnicastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv4UnicastGroup
.- Parameters:
arg
- L3vpnIpv4UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L3vpnIpv6UnicastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv6UnicastGroup
.- Parameters:
arg
- L3vpnIpv6UnicastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L3vpnIpv4MulticastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv4MulticastGroup
.- Parameters:
arg
- L3vpnIpv4MulticastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L3vpnIpv6MulticastGroup arg)
Construct a new builder initialized from specifiedL3vpnIpv6MulticastGroup
.- Parameters:
arg
- L3vpnIpv6MulticastGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L2vpnVplsGroup arg)
Construct a new builder initialized from specifiedL2vpnVplsGroup
.- Parameters:
arg
- L2vpnVplsGroup from which the builder should be initialized
-
AfiSafiBuilder
public AfiSafiBuilder(L2vpnEvpnGroup arg)
Construct a new builder initialized from specifiedL2vpnEvpnGroup
.- Parameters:
arg
- L2vpnEvpnGroup from which the builder should be initialized
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject 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
public AfiSafiKey key()
Return current value associated with the property corresponding toAfiSafi.key()
.- Returns:
- current value
-
getAfiSafiName
public Class<? extends AfiSafiType> getAfiSafiName()
Return current value associated with the property corresponding toAfiSafi.getAfiSafiName()
.- Returns:
- current value
-
getApplyPolicy
public ApplyPolicy getApplyPolicy()
Return current value associated with the property corresponding toApplyPolicyGroup.getApplyPolicy()
.- Returns:
- current value
-
getConfig
public Config getConfig()
Return current value associated with the property corresponding toAfiSafi.getConfig()
.- Returns:
- current value
-
getGracefulRestart
public GracefulRestart getGracefulRestart()
Return current value associated with the property corresponding toAfiSafi.getGracefulRestart()
.- Returns:
- current value
-
getIpv4LabelledUnicast
public Ipv4LabelledUnicast getIpv4LabelledUnicast()
Return current value associated with the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()
.- Returns:
- current value
-
getIpv4Unicast
public Ipv4Unicast getIpv4Unicast()
Return current value associated with the property corresponding toIpv4UnicastGroup.getIpv4Unicast()
.- Returns:
- current value
-
getIpv6LabelledUnicast
public Ipv6LabelledUnicast getIpv6LabelledUnicast()
Return current value associated with the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()
.- Returns:
- current value
-
getIpv6Unicast
public Ipv6Unicast getIpv6Unicast()
Return current value associated with the property corresponding toIpv6UnicastGroup.getIpv6Unicast()
.- Returns:
- current value
-
getL2vpnEvpn
public L2vpnEvpn getL2vpnEvpn()
Return current value associated with the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()
.- Returns:
- current value
-
getL2vpnVpls
public L2vpnVpls getL2vpnVpls()
Return current value associated with the property corresponding toL2vpnVplsGroup.getL2vpnVpls()
.- Returns:
- current value
-
getL3vpnIpv4Multicast
public L3vpnIpv4Multicast getL3vpnIpv4Multicast()
Return current value associated with the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()
.- Returns:
- current value
-
getL3vpnIpv4Unicast
public L3vpnIpv4Unicast getL3vpnIpv4Unicast()
Return current value associated with the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()
.- Returns:
- current value
-
getL3vpnIpv6Multicast
public L3vpnIpv6Multicast getL3vpnIpv6Multicast()
Return current value associated with the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()
.- Returns:
- current value
-
getL3vpnIpv6Unicast
public L3vpnIpv6Unicast getL3vpnIpv6Unicast()
Return current value associated with the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()
.- Returns:
- current value
-
getState
public State getState()
Return current value associated with the property corresponding toAfiSafi.getState()
.- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi>> E$$ augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.- Type Parameters:
E$$
- augmentation type- Parameters:
augmentationType
- augmentation type class- Returns:
- Augmentation object from this builder, or
null
if not present - Throws:
NullPointerException
- ifaugmentType
isnull
-
withKey
public AfiSafiBuilder withKey(AfiSafiKey key)
-
setAfiSafiName
public AfiSafiBuilder setAfiSafiName(Class<? extends AfiSafiType> value)
Set the property corresponding toAfiSafi.getAfiSafiName()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setApplyPolicy
public AfiSafiBuilder setApplyPolicy(ApplyPolicy value)
Set the property corresponding toApplyPolicyGroup.getApplyPolicy()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setConfig
public AfiSafiBuilder setConfig(Config value)
Set the property corresponding toAfiSafi.getConfig()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setGracefulRestart
public AfiSafiBuilder setGracefulRestart(GracefulRestart value)
Set the property corresponding toAfiSafi.getGracefulRestart()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setIpv4LabelledUnicast
public AfiSafiBuilder setIpv4LabelledUnicast(Ipv4LabelledUnicast value)
Set the property corresponding toIpv4LabelledUnicastGroup.getIpv4LabelledUnicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setIpv4Unicast
public AfiSafiBuilder setIpv4Unicast(Ipv4Unicast value)
Set the property corresponding toIpv4UnicastGroup.getIpv4Unicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setIpv6LabelledUnicast
public AfiSafiBuilder setIpv6LabelledUnicast(Ipv6LabelledUnicast value)
Set the property corresponding toIpv6LabelledUnicastGroup.getIpv6LabelledUnicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setIpv6Unicast
public AfiSafiBuilder setIpv6Unicast(Ipv6Unicast value)
Set the property corresponding toIpv6UnicastGroup.getIpv6Unicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL2vpnEvpn
public AfiSafiBuilder setL2vpnEvpn(L2vpnEvpn value)
Set the property corresponding toL2vpnEvpnGroup.getL2vpnEvpn()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL2vpnVpls
public AfiSafiBuilder setL2vpnVpls(L2vpnVpls value)
Set the property corresponding toL2vpnVplsGroup.getL2vpnVpls()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL3vpnIpv4Multicast
public AfiSafiBuilder setL3vpnIpv4Multicast(L3vpnIpv4Multicast value)
Set the property corresponding toL3vpnIpv4MulticastGroup.getL3vpnIpv4Multicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL3vpnIpv4Unicast
public AfiSafiBuilder setL3vpnIpv4Unicast(L3vpnIpv4Unicast value)
Set the property corresponding toL3vpnIpv4UnicastGroup.getL3vpnIpv4Unicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL3vpnIpv6Multicast
public AfiSafiBuilder setL3vpnIpv6Multicast(L3vpnIpv6Multicast value)
Set the property corresponding toL3vpnIpv6MulticastGroup.getL3vpnIpv6Multicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setL3vpnIpv6Unicast
public AfiSafiBuilder setL3vpnIpv6Unicast(L3vpnIpv6Unicast value)
Set the property corresponding toL3vpnIpv6UnicastGroup.getL3vpnIpv6Unicast()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setState
public AfiSafiBuilder setState(State value)
Set the property corresponding toAfiSafi.getState()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
addAugmentation
public AfiSafiBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public AfiSafiBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<AfiSafi>> 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
-
-