Class OvsdbBridgeAugmentationBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentationBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<OvsdbBridgeAugmentation>
,org.opendaylight.yangtools.concepts.CheckedBuilder<OvsdbBridgeAugmentation,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class OvsdbBridgeAugmentationBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<OvsdbBridgeAugmentation>
Class that buildsOvsdbBridgeAugmentation
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:
OvsdbBridgeAugmentation
,Builder
-
-
Constructor Summary
Constructors Constructor Description OvsdbBridgeAugmentationBuilder()
OvsdbBridgeAugmentationBuilder(OvsdbBridgeAttributes arg)
OvsdbBridgeAugmentationBuilder(OvsdbBridgeAugmentation base)
-
Method Summary
-
-
-
Constructor Detail
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder()
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder(OvsdbBridgeAttributes arg)
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder(OvsdbBridgeAugmentation base)
-
-
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:- OvsdbBridgeAttributes
- 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()
-
getBridgeExternalIds
public Map<BridgeExternalIdsKey,BridgeExternalIds> getBridgeExternalIds()
-
getBridgeName
public OvsdbBridgeName getBridgeName()
-
getBridgeOpenflowNodeRef
public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> getBridgeOpenflowNodeRef()
-
getBridgeOtherConfigs
public Map<BridgeOtherConfigsKey,BridgeOtherConfigs> getBridgeOtherConfigs()
-
getBridgeUuid
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getBridgeUuid()
-
getControllerEntry
public Map<ControllerEntryKey,ControllerEntry> getControllerEntry()
-
getDatapathId
public DatapathId getDatapathId()
-
getDatapathType
public Class<? extends DatapathTypeBase> getDatapathType()
-
getFailMode
public Class<? extends OvsdbFailModeBase> getFailMode()
-
getFlowNode
public FlowNodeRef getFlowNode()
-
getManagedBy
public OvsdbNodeRef getManagedBy()
-
getProtocolEntry
public Map<ProtocolEntryKey,ProtocolEntry> getProtocolEntry()
-
getStpEnable
public Boolean getStpEnable()
-
setAutoAttach
public OvsdbBridgeAugmentationBuilder setAutoAttach(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setBridgeExternalIds
public OvsdbBridgeAugmentationBuilder setBridgeExternalIds(Map<BridgeExternalIdsKey,BridgeExternalIds> values)
-
setBridgeName
public OvsdbBridgeAugmentationBuilder setBridgeName(OvsdbBridgeName value)
-
setBridgeOpenflowNodeRef
public OvsdbBridgeAugmentationBuilder setBridgeOpenflowNodeRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> value)
-
setBridgeOtherConfigs
public OvsdbBridgeAugmentationBuilder setBridgeOtherConfigs(Map<BridgeOtherConfigsKey,BridgeOtherConfigs> values)
-
setBridgeUuid
public OvsdbBridgeAugmentationBuilder setBridgeUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setControllerEntry
public OvsdbBridgeAugmentationBuilder setControllerEntry(Map<ControllerEntryKey,ControllerEntry> values)
-
setDatapathId
public OvsdbBridgeAugmentationBuilder setDatapathId(DatapathId value)
-
setDatapathType
public OvsdbBridgeAugmentationBuilder setDatapathType(Class<? extends DatapathTypeBase> value)
-
setFailMode
public OvsdbBridgeAugmentationBuilder setFailMode(Class<? extends OvsdbFailModeBase> value)
-
setFlowNode
public OvsdbBridgeAugmentationBuilder setFlowNode(FlowNodeRef value)
-
setManagedBy
public OvsdbBridgeAugmentationBuilder setManagedBy(OvsdbNodeRef value)
-
setProtocolEntry
public OvsdbBridgeAugmentationBuilder setProtocolEntry(Map<ProtocolEntryKey,ProtocolEntry> values)
-
setStpEnable
public OvsdbBridgeAugmentationBuilder setStpEnable(Boolean value)
-
build
public OvsdbBridgeAugmentation build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<OvsdbBridgeAugmentation>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<OvsdbBridgeAugmentation,IllegalArgumentException>
-
-