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 buildsHwvtepPhysicalPortAugmentation
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:
HwvtepPhysicalPortAugmentation
- 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 HwvtepPhysicalPortAugmentationBuilder()
Construct an empty builder.HwvtepPhysicalPortAugmentationBuilder(HwvtepNodeIdentification arg)
Construct a new builder initialized from specifiedHwvtepNodeIdentification
.HwvtepPhysicalPortAugmentationBuilder(HwvtepPhysicalPortAttributes arg)
Construct a new builder initialized from specifiedHwvtepPhysicalPortAttributes
.HwvtepPhysicalPortAugmentationBuilder(HwvtepPhysicalPortAugmentation base)
Construct a builder initialized with state from specifiedHwvtepPhysicalPortAugmentation
.
-
Method Summary
-
-
-
Constructor Detail
-
HwvtepPhysicalPortAugmentationBuilder
public HwvtepPhysicalPortAugmentationBuilder()
Construct an empty builder.
-
HwvtepPhysicalPortAugmentationBuilder
public HwvtepPhysicalPortAugmentationBuilder(HwvtepPhysicalPortAttributes arg)
Construct a new builder initialized from specifiedHwvtepPhysicalPortAttributes
.- Parameters:
arg
- HwvtepPhysicalPortAttributes from which the builder should be initialized
-
HwvtepPhysicalPortAugmentationBuilder
public HwvtepPhysicalPortAugmentationBuilder(HwvtepNodeIdentification arg)
Construct a new builder initialized from specifiedHwvtepNodeIdentification
.- Parameters:
arg
- HwvtepNodeIdentification from which the builder should be initialized
-
HwvtepPhysicalPortAugmentationBuilder
public HwvtepPhysicalPortAugmentationBuilder(HwvtepPhysicalPortAugmentation base)
Construct a builder initialized with state from specifiedHwvtepPhysicalPortAugmentation
.- Parameters:
base
- HwvtepPhysicalPortAugmentation 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
-
getAclBindings
public Map<AclBindingsKey,AclBindings> getAclBindings()
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
.- Returns:
- current value
-
getHwvtepNodeDescription
public String getHwvtepNodeDescription()
Return current value associated with the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
.- Returns:
- current value
-
getHwvtepNodeName
public HwvtepNodeName 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
public Map<PortFaultStatusKey,PortFaultStatus> getPortFaultStatus()
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getPortFaultStatus()
.- Returns:
- current value
-
getVlanBindings
public Map<VlanBindingsKey,VlanBindings> getVlanBindings()
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanBindings()
.- Returns:
- current value
-
getVlanStats
public Map<VlanStatsKey,VlanStats> getVlanStats()
Return current value associated with the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
.- Returns:
- current value
-
setAclBindings
public HwvtepPhysicalPortAugmentationBuilder setAclBindings(Map<AclBindingsKey,AclBindings> values)
Set the property corresponding toHwvtepPhysicalPortAttributes.getAclBindings()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setHwvtepNodeDescription
public HwvtepPhysicalPortAugmentationBuilder setHwvtepNodeDescription(String value)
Set the property corresponding toHwvtepNodeIdentification.getHwvtepNodeDescription()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setHwvtepNodeName
public HwvtepPhysicalPortAugmentationBuilder setHwvtepNodeName(HwvtepNodeName value)
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
public HwvtepPhysicalPortAugmentationBuilder setVlanStats(Map<VlanStatsKey,VlanStats> values)
Set the property corresponding toHwvtepPhysicalPortAttributes.getVlanStats()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
build
public @NonNull HwvtepPhysicalPortAugmentation build()
A newHwvtepPhysicalPortAugmentation
instance.- Returns:
- A new
HwvtepPhysicalPortAugmentation
instance.
-
-