Class FlatBatchRemoveFlowCaseBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.batch.batch.choice.FlatBatchRemoveFlowCaseBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<FlatBatchRemoveFlowCase>
,org.opendaylight.yangtools.concepts.CheckedBuilder<FlatBatchRemoveFlowCase,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class FlatBatchRemoveFlowCaseBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<FlatBatchRemoveFlowCase>
Class that buildsFlatBatchRemoveFlowCaseBuilder
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:
FlatBatchRemoveFlowCaseBuilder createTarget(int fooXyzzy, int barBaz) { return new FlatBatchRemoveFlowCaseBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of FlatBatchRemoveFlowCaseBuilder, 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:
FlatBatchRemoveFlowCaseBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description FlatBatchRemoveFlowCaseBuilder()
FlatBatchRemoveFlowCaseBuilder(FlatBatchRemoveFlowCase base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlatBatchRemoveFlowCaseBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>>
E$$augmentation(Class<E$$> augmentationType)
FlatBatchRemoveFlowCase
build()
List<FlatBatchRemoveFlow>
getFlatBatchRemoveFlow()
FlatBatchRemoveFlowCaseBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>> augmentationType)
FlatBatchRemoveFlowCaseBuilder
setFlatBatchRemoveFlow(List<FlatBatchRemoveFlow> values)
-
-
-
Constructor Detail
-
FlatBatchRemoveFlowCaseBuilder
public FlatBatchRemoveFlowCaseBuilder()
-
FlatBatchRemoveFlowCaseBuilder
public FlatBatchRemoveFlowCaseBuilder(FlatBatchRemoveFlowCase base)
-
-
Method Detail
-
getFlatBatchRemoveFlow
public List<FlatBatchRemoveFlow> getFlatBatchRemoveFlow()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>> E$$ augmentation(Class<E$$> augmentationType)
-
setFlatBatchRemoveFlow
public FlatBatchRemoveFlowCaseBuilder setFlatBatchRemoveFlow(List<FlatBatchRemoveFlow> values)
-
addAugmentation
public FlatBatchRemoveFlowCaseBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase> augmentationValue)
-
removeAugmentation
public FlatBatchRemoveFlowCaseBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlatBatchRemoveFlowCase>> augmentationType)
-
build
public FlatBatchRemoveFlowCase build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<FlatBatchRemoveFlowCase>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<FlatBatchRemoveFlowCase,IllegalArgumentException>
-
-