Class HwvtepGlobalAugmentationBuilder
java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentationBuilder
Class that builds
HwvtepGlobalAugmentation
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:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an empty builder.Construct a new builder initialized from specifiedHwvtepGlobalAttributes
.Construct a builder initialized with state from specifiedHwvtepGlobalAugmentation
. -
Method Summary
Modifier and TypeMethodDescription@NonNull HwvtepGlobalAugmentation
build()
A newHwvtepGlobalAugmentation
instance.void
fieldsFrom
(org.opendaylight.yangtools.yang.binding.DataObject arg) Set fields from given grouping argument.getAcls()
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getAcls()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getDbVersion()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalArpSources()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalMcastMacs()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalUcastMacs()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalBindingStats()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalRouters()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalSwitches()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getManagers()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteArpSources()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteMcastMacs()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteUcastMacs()
.Return current value associated with the property corresponding toHwvtepGlobalAttributes.getSwitches()
.Set the property corresponding toHwvtepGlobalAttributes.getAcls()
to the specified value.setConnectionInfo
(ConnectionInfo value) Set the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
to the specified value.setDbVersion
(String value) Set the property corresponding toHwvtepGlobalAttributes.getDbVersion()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLocalArpSources()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLocalMcastMacs()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLocalUcastMacs()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLogicalBindingStats()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLogicalRouters()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getLogicalSwitches()
to the specified value.setManagers
(Map<ManagersKey, Managers> values) Set the property corresponding toHwvtepGlobalAttributes.getManagers()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getRemoteArpSources()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getRemoteMcastMacs()
to the specified value.Set the property corresponding toHwvtepGlobalAttributes.getRemoteUcastMacs()
to the specified value.setSwitches
(Map<SwitchesKey, Switches> values) Set the property corresponding toHwvtepGlobalAttributes.getSwitches()
to the specified value.
-
Constructor Details
-
HwvtepGlobalAugmentationBuilder
public HwvtepGlobalAugmentationBuilder()Construct an empty builder. -
HwvtepGlobalAugmentationBuilder
Construct a new builder initialized from specifiedHwvtepGlobalAttributes
.- Parameters:
arg
- HwvtepGlobalAttributes from which the builder should be initialized
-
HwvtepGlobalAugmentationBuilder
Construct a builder initialized with state from specifiedHwvtepGlobalAugmentation
.- Parameters:
base
- HwvtepGlobalAugmentation from which the builder should be initialized
-
-
Method Details
-
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
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getAcls()
.- Returns:
- current value
-
getConnectionInfo
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
.- Returns:
- current value
-
getDbVersion
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getDbVersion()
.- Returns:
- current value
-
getLocalArpSources
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalArpSources()
.- Returns:
- current value
-
getLocalMcastMacs
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalMcastMacs()
.- Returns:
- current value
-
getLocalUcastMacs
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLocalUcastMacs()
.- Returns:
- current value
-
getLogicalBindingStats
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalBindingStats()
.- Returns:
- current value
-
getLogicalRouters
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalRouters()
.- Returns:
- current value
-
getLogicalSwitches
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getLogicalSwitches()
.- Returns:
- current value
-
getManagers
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getManagers()
.- Returns:
- current value
-
getRemoteArpSources
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteArpSources()
.- Returns:
- current value
-
getRemoteMcastMacs
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteMcastMacs()
.- Returns:
- current value
-
getRemoteUcastMacs
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getRemoteUcastMacs()
.- Returns:
- current value
-
getSwitches
Return current value associated with the property corresponding toHwvtepGlobalAttributes.getSwitches()
.- Returns:
- current value
-
setAcls
Set the property corresponding toHwvtepGlobalAttributes.getAcls()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setConnectionInfo
Set the property corresponding toHwvtepGlobalAttributes.getConnectionInfo()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDbVersion
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
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
Set the property corresponding toHwvtepGlobalAttributes.getSwitches()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
build
A newHwvtepGlobalAugmentation
instance.- Returns:
- A new
HwvtepGlobalAugmentation
instance.
-