Class QueuesBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instances.network.instance.protocols.protocol.bgp.neighbors.neighbor.state.QueuesBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Queues>
,org.opendaylight.yangtools.concepts.CheckedBuilder<Queues,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class QueuesBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Queues>
Class that buildsQueuesBuilder
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:
QueuesBuilder createTarget(int fooXyzzy, int barBaz) { return new QueuesBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of QueuesBuilder, 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:
QueuesBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description QueuesBuilder()
QueuesBuilder(BgpNeighborQueueCountersState arg)
QueuesBuilder(Queues base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description QueuesBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Queues> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>>
E$$augmentation(Class<E$$> augmentationType)
Queues
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.org.opendaylight.yangtools.yang.common.Uint32
getInput()
org.opendaylight.yangtools.yang.common.Uint32
getOutput()
QueuesBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>> augmentationType)
QueuesBuilder
setInput(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setInput(Uint32)} instead.QueuesBuilder
setInput(org.opendaylight.yangtools.yang.common.Uint32 value)
QueuesBuilder
setOutput(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setOutput(Uint32)} instead.QueuesBuilder
setOutput(org.opendaylight.yangtools.yang.common.Uint32 value)
-
-
-
Constructor Detail
-
QueuesBuilder
public QueuesBuilder()
-
QueuesBuilder
public QueuesBuilder(BgpNeighborQueueCountersState arg)
-
QueuesBuilder
public QueuesBuilder(Queues 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.http.openconfig.net.yang.bgp.operational.rev151009.BgpNeighborQueueCountersState
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
getInput
public org.opendaylight.yangtools.yang.common.Uint32 getInput()
-
getOutput
public org.opendaylight.yangtools.yang.common.Uint32 getOutput()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>> E$$ augmentation(Class<E$$> augmentationType)
-
setInput
public QueuesBuilder setInput(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setInput
@Deprecated(forRemoval=true) public QueuesBuilder setInput(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setInput(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setOutput
public QueuesBuilder setOutput(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setOutput
@Deprecated(forRemoval=true) public QueuesBuilder setOutput(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setOutput(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
addAugmentation
public QueuesBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Queues> augmentationValue)
-
removeAugmentation
public QueuesBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Queues>> augmentationType)
-
build
public Queues build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<Queues>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<Queues,IllegalArgumentException>
-
-