Class OvsdbBridgeAugmentationBuilder
java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentationBuilder
Class that builds
OvsdbBridgeAugmentation
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:
OvsdbBridgeAugmentation createOvsdbBridgeAugmentation(int fooXyzzy, int barBaz) {
return new OvsdbBridgeAugmentationBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of OvsdbBridgeAugmentation, 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
ConstructorDescriptionConstruct an empty builder.Construct a new builder initialized from specifiedOvsdbBridgeAttributes
.Construct a builder initialized with state from specifiedOvsdbBridgeAugmentation
. -
Method Summary
Modifier and TypeMethodDescription@NonNull OvsdbBridgeAugmentation
build()
A newOvsdbBridgeAugmentation
instance.void
fieldsFrom
(org.opendaylight.yangtools.yang.binding.DataObject arg) Set fields from given grouping argument.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeName()
.org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathId()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathType()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFailMode()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFlowNode()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getManagedBy()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
.Return current value associated with the property corresponding toOvsdbBridgeAttributes.getStpEnable()
.setAutoAttach
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
to the specified value.Set the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
to the specified value.setBridgeName
(OvsdbBridgeName value) Set the property corresponding toOvsdbBridgeAttributes.getBridgeName()
to the specified value.setBridgeOpenflowNodeRef
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> value) Set the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
to the specified value.Set the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
to the specified value.setBridgeUuid
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
to the specified value.Set the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
to the specified value.setDatapathId
(DatapathId value) Set the property corresponding toOvsdbBridgeAttributes.getDatapathId()
to the specified value.setDatapathType
(DatapathTypeBase value) Set the property corresponding toOvsdbBridgeAttributes.getDatapathType()
to the specified value.setFailMode
(OvsdbFailModeBase value) Set the property corresponding toOvsdbBridgeAttributes.getFailMode()
to the specified value.setFlowNode
(FlowNodeRef value) Set the property corresponding toOvsdbBridgeAttributes.getFlowNode()
to the specified value.setManagedBy
(OvsdbNodeRef value) Set the property corresponding toOvsdbBridgeAttributes.getManagedBy()
to the specified value.setProtocolEntry
(Map<ProtocolEntryKey, ProtocolEntry> values) Set the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
to the specified value.setStpEnable
(Boolean value) Set the property corresponding toOvsdbBridgeAttributes.getStpEnable()
to the specified value.
-
Constructor Details
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder()Construct an empty builder. -
OvsdbBridgeAugmentationBuilder
Construct a new builder initialized from specifiedOvsdbBridgeAttributes
.- Parameters:
arg
- OvsdbBridgeAttributes from which the builder should be initialized
-
OvsdbBridgeAugmentationBuilder
Construct a builder initialized with state from specifiedOvsdbBridgeAugmentation
.- Parameters:
base
- OvsdbBridgeAugmentation 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
-
getAutoAttach
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getAutoAttach()Return current value associated with the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
.- Returns:
- current value
-
getBridgeExternalIds
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
.- Returns:
- current value
-
getBridgeName
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeName()
.- Returns:
- current value
-
getBridgeOpenflowNodeRef
public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> getBridgeOpenflowNodeRef()Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
.- Returns:
- current value
-
getBridgeOtherConfigs
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
.- Returns:
- current value
-
getBridgeUuid
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getBridgeUuid()Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
.- Returns:
- current value
-
getControllerEntry
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
.- Returns:
- current value
-
getDatapathId
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathId()
.- Returns:
- current value
-
getDatapathType
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathType()
.- Returns:
- current value
-
getFailMode
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFailMode()
.- Returns:
- current value
-
getFlowNode
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFlowNode()
.- Returns:
- current value
-
getManagedBy
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getManagedBy()
.- Returns:
- current value
-
getProtocolEntry
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
.- Returns:
- current value
-
getStpEnable
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getStpEnable()
.- Returns:
- current value
-
setAutoAttach
public OvsdbBridgeAugmentationBuilder setAutoAttach(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeExternalIds
public OvsdbBridgeAugmentationBuilder setBridgeExternalIds(Map<BridgeExternalIdsKey, BridgeExternalIds> values) Set the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setBridgeName
Set the property corresponding toOvsdbBridgeAttributes.getBridgeName()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeOpenflowNodeRef
public OvsdbBridgeAugmentationBuilder setBridgeOpenflowNodeRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> value) Set the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeOtherConfigs
public OvsdbBridgeAugmentationBuilder setBridgeOtherConfigs(Map<BridgeOtherConfigsKey, BridgeOtherConfigs> values) Set the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setBridgeUuid
public OvsdbBridgeAugmentationBuilder setBridgeUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setControllerEntry
public OvsdbBridgeAugmentationBuilder setControllerEntry(Map<ControllerEntryKey, ControllerEntry> values) Set the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setDatapathId
Set the property corresponding toOvsdbBridgeAttributes.getDatapathId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDatapathType
Set the property corresponding toOvsdbBridgeAttributes.getDatapathType()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFailMode
Set the property corresponding toOvsdbBridgeAttributes.getFailMode()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFlowNode
Set the property corresponding toOvsdbBridgeAttributes.getFlowNode()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setManagedBy
Set the property corresponding toOvsdbBridgeAttributes.getManagedBy()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setProtocolEntry
Set the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setStpEnable
Set the property corresponding toOvsdbBridgeAttributes.getStpEnable()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
build
A newOvsdbBridgeAugmentation
instance.- Returns:
- A new
OvsdbBridgeAugmentation
instance.
-