Class HwvtepGlobalAugmentationBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentationBuilder
-
@Generated("mdsal-binding-generator") public class HwvtepGlobalAugmentationBuilder extends Object
Class that buildsHwvtepGlobalAugmentation
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:
HwvtepGlobalAugmentation createHwvtepGlobalAugmentation(int fooXyzzy, int barBaz) { return new HwvtepGlobalAugmentationBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of HwvtepGlobalAugmentation, 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:
HwvtepGlobalAugmentation
- 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 HwvtepGlobalAugmentationBuilder()
Construct an empty builder.HwvtepGlobalAugmentationBuilder(HwvtepGlobalAttributes arg)
Construct a new builder initialized from specifiedHwvtepGlobalAttributes
.HwvtepGlobalAugmentationBuilder(HwvtepGlobalAugmentation base)
Construct a builder initialized with state from specifiedHwvtepGlobalAugmentation
.
-
Method Summary
-
-
-
Constructor Detail
-
HwvtepGlobalAugmentationBuilder
public HwvtepGlobalAugmentationBuilder()
Construct an empty builder.
-
HwvtepGlobalAugmentationBuilder
public HwvtepGlobalAugmentationBuilder(HwvtepGlobalAttributes arg)
Construct a new builder initialized from specifiedHwvtepGlobalAttributes
.- Parameters:
arg
- HwvtepGlobalAttributes from which the builder should be initialized
-
HwvtepGlobalAugmentationBuilder
public HwvtepGlobalAugmentationBuilder(HwvtepGlobalAugmentation base)
Construct a builder initialized with state from specifiedHwvtepGlobalAugmentation
.- Parameters:
base
- HwvtepGlobalAugmentation 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
-
getAcls
public Map<AclsKey,Acls> getAcls()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getAcls()
.- Returns:
- current value
-
getConnectionInfo
public ConnectionInfo getConnectionInfo()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
.- Returns:
- current value
-
getDbVersion
public String getDbVersion()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getDbVersion()
.- Returns:
- current value
-
getLocalArpSources
public Map<LocalArpSourcesKey,LocalArpSources> getLocalArpSources()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalArpSources()
.- Returns:
- current value
-
getLocalMcastMacs
public Map<LocalMcastMacsKey,LocalMcastMacs> getLocalMcastMacs()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalMcastMacs()
.- Returns:
- current value
-
getLocalUcastMacs
public Map<LocalUcastMacsKey,LocalUcastMacs> getLocalUcastMacs()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalUcastMacs()
.- Returns:
- current value
-
getLogicalBindingStats
public Map<LogicalBindingStatsKey,LogicalBindingStats> getLogicalBindingStats()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalBindingStats()
.- Returns:
- current value
-
getLogicalRouters
public Map<LogicalRoutersKey,LogicalRouters> getLogicalRouters()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalRouters()
.- Returns:
- current value
-
getLogicalSwitches
public Map<LogicalSwitchesKey,LogicalSwitches> getLogicalSwitches()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalSwitches()
.- Returns:
- current value
-
getManagers
public Map<ManagersKey,Managers> getManagers()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getManagers()
.- Returns:
- current value
-
getRemoteArpSources
public Map<RemoteArpSourcesKey,RemoteArpSources> getRemoteArpSources()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteArpSources()
.- Returns:
- current value
-
getRemoteMcastMacs
public Map<RemoteMcastMacsKey,RemoteMcastMacs> getRemoteMcastMacs()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteMcastMacs()
.- Returns:
- current value
-
getRemoteUcastMacs
public Map<RemoteUcastMacsKey,RemoteUcastMacs> getRemoteUcastMacs()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteUcastMacs()
.- Returns:
- current value
-
getSwitches
public Map<SwitchesKey,Switches> getSwitches()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getSwitches()
.- Returns:
- current value
-
setAcls
public HwvtepGlobalAugmentationBuilder setAcls(Map<AclsKey,Acls> values)
Set the property corresponding toHwvtepGlobalAttributes.getAcls()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setConnectionInfo
public HwvtepGlobalAugmentationBuilder setConnectionInfo(ConnectionInfo value)
Set the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDbVersion
public HwvtepGlobalAugmentationBuilder setDbVersion(String value)
Set the property corresponding toHwvtepGlobalAttributes.getDbVersion()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setLocalArpSources
public HwvtepGlobalAugmentationBuilder setLocalArpSources(Map<LocalArpSourcesKey,LocalArpSources> values)
Set the property corresponding toHwvtepGlobalAttributes.getLocalArpSources()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setLocalMcastMacs
public HwvtepGlobalAugmentationBuilder setLocalMcastMacs(Map<LocalMcastMacsKey,LocalMcastMacs> values)
Set the property corresponding toHwvtepGlobalAttributes.getLocalMcastMacs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setLocalUcastMacs
public HwvtepGlobalAugmentationBuilder setLocalUcastMacs(Map<LocalUcastMacsKey,LocalUcastMacs> values)
Set the property corresponding toHwvtepGlobalAttributes.getLocalUcastMacs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setLogicalBindingStats
public HwvtepGlobalAugmentationBuilder setLogicalBindingStats(Map<LogicalBindingStatsKey,LogicalBindingStats> values)
Set the property corresponding toHwvtepGlobalAttributes.getLogicalBindingStats()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setLogicalRouters
public HwvtepGlobalAugmentationBuilder setLogicalRouters(Map<LogicalRoutersKey,LogicalRouters> values)
Set the property corresponding toHwvtepGlobalAttributes.getLogicalRouters()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setLogicalSwitches
public HwvtepGlobalAugmentationBuilder setLogicalSwitches(Map<LogicalSwitchesKey,LogicalSwitches> values)
Set the property corresponding toHwvtepGlobalAttributes.getLogicalSwitches()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setManagers
public HwvtepGlobalAugmentationBuilder setManagers(Map<ManagersKey,Managers> values)
Set the property corresponding toHwvtepGlobalAttributes.getManagers()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setRemoteArpSources
public HwvtepGlobalAugmentationBuilder setRemoteArpSources(Map<RemoteArpSourcesKey,RemoteArpSources> values)
Set the property corresponding toHwvtepGlobalAttributes.getRemoteArpSources()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setRemoteMcastMacs
public HwvtepGlobalAugmentationBuilder setRemoteMcastMacs(Map<RemoteMcastMacsKey,RemoteMcastMacs> values)
Set the property corresponding toHwvtepGlobalAttributes.getRemoteMcastMacs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setRemoteUcastMacs
public HwvtepGlobalAugmentationBuilder setRemoteUcastMacs(Map<RemoteUcastMacsKey,RemoteUcastMacs> values)
Set the property corresponding toHwvtepGlobalAttributes.getRemoteUcastMacs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setSwitches
public HwvtepGlobalAugmentationBuilder setSwitches(Map<SwitchesKey,Switches> values)
Set the property corresponding toHwvtepGlobalAttributes.getSwitches()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
build
public @NonNull HwvtepGlobalAugmentation build()
A newHwvtepGlobalAugmentation
instance.- Returns:
- A new
HwvtepGlobalAugmentation
instance.
-
-