Class FlowCapableNodeBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<FlowCapableNode>
,org.opendaylight.yangtools.concepts.CheckedBuilder<FlowCapableNode,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class FlowCapableNodeBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<FlowCapableNode>
Class that buildsFlowCapableNodeBuilder
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:
FlowCapableNodeBuilder createTarget(int fooXyzzy, int barBaz) { return new FlowCapableNodeBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of FlowCapableNodeBuilder, 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 oportunities, 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:
FlowCapableNodeBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description FlowCapableNodeBuilder()
FlowCapableNodeBuilder(Desc arg)
FlowCapableNodeBuilder(FlowCapableNode base)
FlowCapableNodeBuilder(FlowNode arg)
FlowCapableNodeBuilder(IpAddressGrouping arg)
FlowCapableNodeBuilder(Meters arg)
FlowCapableNodeBuilder(PortNumberGrouping arg)
FlowCapableNodeBuilder(Tables arg)
FlowCapableNodeBuilder(Groups arg)
FlowCapableNodeBuilder(TableFeatures arg)
-
Method Summary
-
-
-
Constructor Detail
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder()
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(FlowNode arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(Desc arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(Tables arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(TableFeatures arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(Groups arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(Meters arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(IpAddressGrouping arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(PortNumberGrouping arg)
-
FlowCapableNodeBuilder
public FlowCapableNodeBuilder(FlowCapableNode 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:- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Desc
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Meters
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.PortNumberGrouping
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.IpAddressGrouping
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Tables
- org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowNode
- org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures
- org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.Groups
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getDescription
public String getDescription()
-
getHardware
public String getHardware()
-
getIpAddress
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getIpAddress()
-
getManufacturer
public String getManufacturer()
-
getPortNumber
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber getPortNumber()
-
getSerialNumber
public String getSerialNumber()
-
getSoftware
public String getSoftware()
-
getStaleGroup
public Map<StaleGroupKey,StaleGroup> getStaleGroup()
-
getStaleMeter
public Map<StaleMeterKey,StaleMeter> getStaleMeter()
-
getSupportedActions
public SupportedActions getSupportedActions()
-
getSupportedInstructions
public SupportedInstructions getSupportedInstructions()
-
getSupportedMatchTypes
public SupportedMatchTypes getSupportedMatchTypes()
-
getSwitchFeatures
public SwitchFeatures getSwitchFeatures()
-
getTableFeatures
public Map<TableFeaturesKey,TableFeatures> getTableFeatures()
-
setDescription
public FlowCapableNodeBuilder setDescription(String value)
-
setGroup
public FlowCapableNodeBuilder setGroup(Map<GroupKey,Group> values)
-
setGroup
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setGroup(List<Group> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetGroup(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setHardware
public FlowCapableNodeBuilder setHardware(String value)
-
setIpAddress
public FlowCapableNodeBuilder setIpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress value)
-
setManufacturer
public FlowCapableNodeBuilder setManufacturer(String value)
-
setMeter
public FlowCapableNodeBuilder setMeter(Map<MeterKey,Meter> values)
-
setMeter
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setMeter(List<Meter> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetMeter(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setPortNumber
public FlowCapableNodeBuilder setPortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber value)
-
setSerialNumber
public FlowCapableNodeBuilder setSerialNumber(String value)
-
setSoftware
public FlowCapableNodeBuilder setSoftware(String value)
-
setStaleGroup
public FlowCapableNodeBuilder setStaleGroup(Map<StaleGroupKey,StaleGroup> values)
-
setStaleGroup
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setStaleGroup(List<StaleGroup> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetStaleGroup(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setStaleMeter
public FlowCapableNodeBuilder setStaleMeter(Map<StaleMeterKey,StaleMeter> values)
-
setStaleMeter
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setStaleMeter(List<StaleMeter> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetStaleMeter(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setSupportedActions
public FlowCapableNodeBuilder setSupportedActions(SupportedActions value)
-
setSupportedInstructions
public FlowCapableNodeBuilder setSupportedInstructions(SupportedInstructions value)
-
setSupportedMatchTypes
public FlowCapableNodeBuilder setSupportedMatchTypes(SupportedMatchTypes value)
-
setSwitchFeatures
public FlowCapableNodeBuilder setSwitchFeatures(SwitchFeatures value)
-
setTable
public FlowCapableNodeBuilder setTable(Map<TableKey,Table> values)
-
setTable
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setTable(List<Table> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTable(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
setTableFeatures
public FlowCapableNodeBuilder setTableFeatures(Map<TableFeaturesKey,TableFeatures> values)
-
setTableFeatures
@Deprecated(forRemoval=true) public FlowCapableNodeBuilder setTableFeatures(List<TableFeatures> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTableFeatures(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the list contains entries with the same keyNullPointerException
- if the list contains a null entry
-
build
public FlowCapableNode build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<FlowCapableNode>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<FlowCapableNode,IllegalArgumentException>
-
-