Class OvsdbNodeAugmentationBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbNodeAugmentationBuilder
-
@Generated("mdsal-binding-generator") public class OvsdbNodeAugmentationBuilder extends Object
Class that buildsOvsdbNodeAugmentation
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:
OvsdbNodeAugmentation createOvsdbNodeAugmentation(int fooXyzzy, int barBaz) { return new OvsdbNodeAugmentationBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of OvsdbNodeAugmentation, 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:
OvsdbNodeAugmentation
- 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 OvsdbNodeAugmentationBuilder()
Construct an empty builder.OvsdbNodeAugmentationBuilder(OvsdbNodeAttributes arg)
Construct a new builder initialized from specifiedOvsdbNodeAttributes
.OvsdbNodeAugmentationBuilder(OvsdbNodeAugmentation base)
Construct a builder initialized with state from specifiedOvsdbNodeAugmentation
.
-
Method Summary
-
-
-
Constructor Detail
-
OvsdbNodeAugmentationBuilder
public OvsdbNodeAugmentationBuilder()
Construct an empty builder.
-
OvsdbNodeAugmentationBuilder
public OvsdbNodeAugmentationBuilder(OvsdbNodeAttributes arg)
Construct a new builder initialized from specifiedOvsdbNodeAttributes
.- Parameters:
arg
- OvsdbNodeAttributes from which the builder should be initialized
-
OvsdbNodeAugmentationBuilder
public OvsdbNodeAugmentationBuilder(OvsdbNodeAugmentation base)
Construct a builder initialized with state from specifiedOvsdbNodeAugmentation
.- Parameters:
base
- OvsdbNodeAugmentation 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
-
getAutoattach
public Map<AutoattachKey,Autoattach> getAutoattach()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getAutoattach()
.- Returns:
- current value
-
getConnectionInfo
public ConnectionInfo getConnectionInfo()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getConnectionInfo()
.- Returns:
- current value
-
getDatapathTypeEntry
public Map<DatapathTypeEntryKey,DatapathTypeEntry> getDatapathTypeEntry()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getDatapathTypeEntry()
.- Returns:
- current value
-
getDbVersion
public String getDbVersion()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getDbVersion()
.- Returns:
- current value
-
getInterfaceTypeEntry
public Map<InterfaceTypeEntryKey,InterfaceTypeEntry> getInterfaceTypeEntry()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getInterfaceTypeEntry()
.- Returns:
- current value
-
getManagedNodeEntry
public Map<ManagedNodeEntryKey,ManagedNodeEntry> getManagedNodeEntry()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getManagedNodeEntry()
.- Returns:
- current value
-
getManagerEntry
public Map<ManagerEntryKey,ManagerEntry> getManagerEntry()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getManagerEntry()
.- Returns:
- current value
-
getOpenvswitchExternalIds
public Map<OpenvswitchExternalIdsKey,OpenvswitchExternalIds> getOpenvswitchExternalIds()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getOpenvswitchExternalIds()
.- Returns:
- current value
-
getOpenvswitchOtherConfigs
public Map<OpenvswitchOtherConfigsKey,OpenvswitchOtherConfigs> getOpenvswitchOtherConfigs()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getOpenvswitchOtherConfigs()
.- Returns:
- current value
-
getOvsVersion
public String getOvsVersion()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getOvsVersion()
.- Returns:
- current value
-
getQosEntries
public Map<QosEntriesKey,QosEntries> getQosEntries()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getQosEntries()
.- Returns:
- current value
-
getQueues
public Map<QueuesKey,Queues> getQueues()
Return current value associated with the property corresponding toOvsdbNodeAttributes.getQueues()
.- Returns:
- current value
-
setAutoattach
public OvsdbNodeAugmentationBuilder setAutoattach(Map<AutoattachKey,Autoattach> values)
Set the property corresponding toOvsdbNodeAttributes.getAutoattach()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setConnectionInfo
public OvsdbNodeAugmentationBuilder setConnectionInfo(ConnectionInfo value)
Set the property corresponding toOvsdbNodeAttributes.getConnectionInfo()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDatapathTypeEntry
public OvsdbNodeAugmentationBuilder setDatapathTypeEntry(Map<DatapathTypeEntryKey,DatapathTypeEntry> values)
Set the property corresponding toOvsdbNodeAttributes.getDatapathTypeEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setDbVersion
public OvsdbNodeAugmentationBuilder setDbVersion(String value)
Set the property corresponding toOvsdbNodeAttributes.getDbVersion()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setInterfaceTypeEntry
public OvsdbNodeAugmentationBuilder setInterfaceTypeEntry(Map<InterfaceTypeEntryKey,InterfaceTypeEntry> values)
Set the property corresponding toOvsdbNodeAttributes.getInterfaceTypeEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setManagedNodeEntry
public OvsdbNodeAugmentationBuilder setManagedNodeEntry(Map<ManagedNodeEntryKey,ManagedNodeEntry> values)
Set the property corresponding toOvsdbNodeAttributes.getManagedNodeEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setManagerEntry
public OvsdbNodeAugmentationBuilder setManagerEntry(Map<ManagerEntryKey,ManagerEntry> values)
Set the property corresponding toOvsdbNodeAttributes.getManagerEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setOpenvswitchExternalIds
public OvsdbNodeAugmentationBuilder setOpenvswitchExternalIds(Map<OpenvswitchExternalIdsKey,OpenvswitchExternalIds> values)
Set the property corresponding toOvsdbNodeAttributes.getOpenvswitchExternalIds()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setOpenvswitchOtherConfigs
public OvsdbNodeAugmentationBuilder setOpenvswitchOtherConfigs(Map<OpenvswitchOtherConfigsKey,OpenvswitchOtherConfigs> values)
Set the property corresponding toOvsdbNodeAttributes.getOpenvswitchOtherConfigs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setOvsVersion
public OvsdbNodeAugmentationBuilder setOvsVersion(String value)
Set the property corresponding toOvsdbNodeAttributes.getOvsVersion()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setQosEntries
public OvsdbNodeAugmentationBuilder setQosEntries(Map<QosEntriesKey,QosEntries> values)
Set the property corresponding toOvsdbNodeAttributes.getQosEntries()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setQueues
public OvsdbNodeAugmentationBuilder setQueues(Map<QueuesKey,Queues> values)
Set the property corresponding toOvsdbNodeAttributes.getQueues()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
build
public @NonNull OvsdbNodeAugmentation build()
A newOvsdbNodeAugmentation
instance.- Returns:
- A new
OvsdbNodeAugmentation
instance.
-
-