Package org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.update.flows.batch.input
Class BatchUpdateFlowsBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.update.flows.batch.input.BatchUpdateFlowsBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<BatchUpdateFlows>
,org.opendaylight.yangtools.concepts.CheckedBuilder<BatchUpdateFlows,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class BatchUpdateFlowsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<BatchUpdateFlows>
Class that buildsBatchUpdateFlowsBuilder
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:
BatchUpdateFlowsBuilder createTarget(int fooXyzzy, int barBaz) { return new BatchUpdateFlowsBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of BatchUpdateFlowsBuilder, 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:
BatchUpdateFlowsBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description BatchUpdateFlowsBuilder()
BatchUpdateFlowsBuilder(BatchFlowIdGrouping arg)
BatchUpdateFlowsBuilder(BatchFlowInputUpdateGrouping arg)
BatchUpdateFlowsBuilder(BatchUpdateFlows base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchUpdateFlowsBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>>
E$$augmentation(Class<E$$> augmentationType)
BatchUpdateFlows
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.FlowId
getFlowId()
OriginalBatchedFlow
getOriginalBatchedFlow()
UpdatedBatchedFlow
getUpdatedBatchedFlow()
BatchUpdateFlowsKey
key()
BatchUpdateFlowsBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>> augmentationType)
BatchUpdateFlowsBuilder
setFlowId(FlowId value)
BatchUpdateFlowsBuilder
setOriginalBatchedFlow(OriginalBatchedFlow value)
BatchUpdateFlowsBuilder
setUpdatedBatchedFlow(UpdatedBatchedFlow value)
BatchUpdateFlowsBuilder
withKey(BatchUpdateFlowsKey key)
-
-
-
Constructor Detail
-
BatchUpdateFlowsBuilder
public BatchUpdateFlowsBuilder()
-
BatchUpdateFlowsBuilder
public BatchUpdateFlowsBuilder(BatchFlowInputUpdateGrouping arg)
-
BatchUpdateFlowsBuilder
public BatchUpdateFlowsBuilder(BatchFlowIdGrouping arg)
-
BatchUpdateFlowsBuilder
public BatchUpdateFlowsBuilder(BatchUpdateFlows 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.flows.service.rev160314.BatchFlowIdGrouping
- org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.BatchFlowInputUpdateGrouping
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
key
public BatchUpdateFlowsKey key()
-
getFlowId
public FlowId getFlowId()
-
getOriginalBatchedFlow
public OriginalBatchedFlow getOriginalBatchedFlow()
-
getUpdatedBatchedFlow
public UpdatedBatchedFlow getUpdatedBatchedFlow()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>> E$$ augmentation(Class<E$$> augmentationType)
-
withKey
public BatchUpdateFlowsBuilder withKey(BatchUpdateFlowsKey key)
-
setFlowId
public BatchUpdateFlowsBuilder setFlowId(FlowId value)
-
setOriginalBatchedFlow
public BatchUpdateFlowsBuilder setOriginalBatchedFlow(OriginalBatchedFlow value)
-
setUpdatedBatchedFlow
public BatchUpdateFlowsBuilder setUpdatedBatchedFlow(UpdatedBatchedFlow value)
-
addAugmentation
public BatchUpdateFlowsBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows> augmentationValue)
-
removeAugmentation
public BatchUpdateFlowsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BatchUpdateFlows>> augmentationType)
-
build
public BatchUpdateFlows build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<BatchUpdateFlows>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<BatchUpdateFlows,IllegalArgumentException>
-
-