Class HwvtepPhysicalPortAugmentationBuilder
java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalPortAugmentationBuilder
@Generated("mdsal-binding-generator")
public class HwvtepPhysicalPortAugmentationBuilder
extends Object
Class that builds
HwvtepPhysicalPortAugmentation
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:
HwvtepPhysicalPortAugmentation createHwvtepPhysicalPortAugmentation(int fooXyzzy, int barBaz) {
return new HwvtepPhysicalPortAugmentationBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of HwvtepPhysicalPortAugmentation, 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 specifiedHwvtepNodeIdentification
.Construct a new builder initialized from specifiedHwvtepPhysicalPortAttributes
.Construct a builder initialized with state from specifiedHwvtepPhysicalPortAugmentation
. -
Method Summary
Modifier and TypeMethodDescription@NonNull HwvtepPhysicalPortAugmentation
build()
A newHwvtepPhysicalPortAugmentation
instance.void
fieldsFrom
(org.opendaylight.yangtools.yang.binding.DataObject arg) Set fields from given grouping argument.Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
.Return current value associated with the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
.Return current value associated with the property corresponding toHwvtepNodeIdentification.getHwvtepNodeName()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getPhysicalPortUuid()
.Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getPortFaultStatus()
.Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanBindings()
.Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
.setAclBindings
(Map<AclBindingsKey, AclBindings> values) Set the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
to the specified value.setHwvtepNodeDescription
(String value) Set the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
to the specified value.setHwvtepNodeName
(HwvtepNodeName value) Set the property corresponding toHwvtepNodeIdentification.getHwvtepNodeName()
to the specified value.setPhysicalPortUuid
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toHwvtepPhysicalPortAttributes.getPhysicalPortUuid()
to the specified value.Set the property corresponding toHwvtepPhysicalPortAttributes.getPortFaultStatus()
to the specified value.setVlanBindings
(Map<VlanBindingsKey, VlanBindings> values) Set the property corresponding toHwvtepPhysicalPortAttributes.getVlanBindings()
to the specified value.setVlanStats
(Map<VlanStatsKey, VlanStats> values) Set the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
to the specified value.
-
Constructor Details
-
HwvtepPhysicalPortAugmentationBuilder
public HwvtepPhysicalPortAugmentationBuilder()Construct an empty builder. -
HwvtepPhysicalPortAugmentationBuilder
Construct a new builder initialized from specifiedHwvtepPhysicalPortAttributes
.- Parameters:
arg
- HwvtepPhysicalPortAttributes from which the builder should be initialized
-
HwvtepPhysicalPortAugmentationBuilder
Construct a new builder initialized from specifiedHwvtepNodeIdentification
.- Parameters:
arg
- HwvtepNodeIdentification from which the builder should be initialized
-
HwvtepPhysicalPortAugmentationBuilder
Construct a builder initialized with state from specifiedHwvtepPhysicalPortAugmentation
.- Parameters:
base
- HwvtepPhysicalPortAugmentation 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
-
getAclBindings
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
.- Returns:
- current value
-
getHwvtepNodeDescription
Return current value associated with the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
.- Returns:
- current value
-
getHwvtepNodeName
Return current value associated with the property corresponding toHwvtepNodeIdentification.getHwvtepNodeName()
.- Returns:
- current value
-
getPhysicalPortUuid
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getPhysicalPortUuid()Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getPhysicalPortUuid()
.- Returns:
- current value
-
getPortFaultStatus
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getPortFaultStatus()
.- Returns:
- current value
-
getVlanBindings
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanBindings()
.- Returns:
- current value
-
getVlanStats
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
.- Returns:
- current value
-
setAclBindings
Set the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setHwvtepNodeDescription
Set the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setHwvtepNodeName
Set the property corresponding toHwvtepNodeIdentification.getHwvtepNodeName()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPhysicalPortUuid
public HwvtepPhysicalPortAugmentationBuilder setPhysicalPortUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value) Set the property corresponding toHwvtepPhysicalPortAttributes.getPhysicalPortUuid()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPortFaultStatus
public HwvtepPhysicalPortAugmentationBuilder setPortFaultStatus(Map<PortFaultStatusKey, PortFaultStatus> values) Set the property corresponding toHwvtepPhysicalPortAttributes.getPortFaultStatus()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setVlanBindings
public HwvtepPhysicalPortAugmentationBuilder setVlanBindings(Map<VlanBindingsKey, VlanBindings> values) Set the property corresponding toHwvtepPhysicalPortAttributes.getVlanBindings()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setVlanStats
Set the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
build
A newHwvtepPhysicalPortAugmentation
instance.- Returns:
- A new
HwvtepPhysicalPortAugmentation
instance.
-