Class PortStatsBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats._case.multipart.reply.port.stats.PortStatsBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<PortStats>
,org.opendaylight.yangtools.concepts.CheckedBuilder<PortStats,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class PortStatsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<PortStats>
Class that buildsPortStatsBuilder
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:
PortStatsBuilder createTarget(int fooXyzzy, int barBaz) { return new PortStatsBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of PortStatsBuilder, 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:
PortStatsBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description PortStatsBuilder()
PortStatsBuilder(PortStats base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PortStatsBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<PortStats> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>>
E$$augmentation(Class<E$$> augmentationType)
PortStats
build()
org.opendaylight.yangtools.yang.common.Uint64
getCollisions()
org.opendaylight.yangtools.yang.common.Uint32
getDurationNsec()
org.opendaylight.yangtools.yang.common.Uint32
getDurationSec()
org.opendaylight.yangtools.yang.common.Uint32
getPortNo()
org.opendaylight.yangtools.yang.common.Uint64
getRxBytes()
org.opendaylight.yangtools.yang.common.Uint64
getRxCrcErr()
org.opendaylight.yangtools.yang.common.Uint64
getRxDropped()
org.opendaylight.yangtools.yang.common.Uint64
getRxErrors()
org.opendaylight.yangtools.yang.common.Uint64
getRxFrameErr()
org.opendaylight.yangtools.yang.common.Uint64
getRxOverErr()
org.opendaylight.yangtools.yang.common.Uint64
getRxPackets()
org.opendaylight.yangtools.yang.common.Uint64
getTxBytes()
org.opendaylight.yangtools.yang.common.Uint64
getTxDropped()
org.opendaylight.yangtools.yang.common.Uint64
getTxErrors()
org.opendaylight.yangtools.yang.common.Uint64
getTxPackets()
PortStatsBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> augmentationType)
Remove an augmentation from this builder's product.PortStatsBuilder
setCollisions(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetCollisions(Uint64)
instead.PortStatsBuilder
setCollisions(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setDurationNsec(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDurationNsec(Uint32)
instead.PortStatsBuilder
setDurationNsec(org.opendaylight.yangtools.yang.common.Uint32 value)
PortStatsBuilder
setDurationSec(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDurationSec(Uint32)
instead.PortStatsBuilder
setDurationSec(org.opendaylight.yangtools.yang.common.Uint32 value)
PortStatsBuilder
setPortNo(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetPortNo(Uint32)
instead.PortStatsBuilder
setPortNo(org.opendaylight.yangtools.yang.common.Uint32 value)
PortStatsBuilder
setRxBytes(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxBytes(Uint64)
instead.PortStatsBuilder
setRxBytes(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxCrcErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxCrcErr(Uint64)
instead.PortStatsBuilder
setRxCrcErr(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxDropped(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxDropped(Uint64)
instead.PortStatsBuilder
setRxDropped(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxErrors(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxErrors(Uint64)
instead.PortStatsBuilder
setRxErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxFrameErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxFrameErr(Uint64)
instead.PortStatsBuilder
setRxFrameErr(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxOverErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxOverErr(Uint64)
instead.PortStatsBuilder
setRxOverErr(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setRxPackets(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxPackets(Uint64)
instead.PortStatsBuilder
setRxPackets(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setTxBytes(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxBytes(Uint64)
instead.PortStatsBuilder
setTxBytes(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setTxDropped(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxDropped(Uint64)
instead.PortStatsBuilder
setTxDropped(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setTxErrors(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxErrors(Uint64)
instead.PortStatsBuilder
setTxErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
PortStatsBuilder
setTxPackets(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxPackets(Uint64)
instead.PortStatsBuilder
setTxPackets(org.opendaylight.yangtools.yang.common.Uint64 value)
-
-
-
Constructor Detail
-
PortStatsBuilder
public PortStatsBuilder()
-
PortStatsBuilder
public PortStatsBuilder(PortStats base)
-
-
Method Detail
-
getCollisions
public org.opendaylight.yangtools.yang.common.Uint64 getCollisions()
-
getDurationNsec
public org.opendaylight.yangtools.yang.common.Uint32 getDurationNsec()
-
getDurationSec
public org.opendaylight.yangtools.yang.common.Uint32 getDurationSec()
-
getPortNo
public org.opendaylight.yangtools.yang.common.Uint32 getPortNo()
-
getRxBytes
public org.opendaylight.yangtools.yang.common.Uint64 getRxBytes()
-
getRxCrcErr
public org.opendaylight.yangtools.yang.common.Uint64 getRxCrcErr()
-
getRxDropped
public org.opendaylight.yangtools.yang.common.Uint64 getRxDropped()
-
getRxErrors
public org.opendaylight.yangtools.yang.common.Uint64 getRxErrors()
-
getRxFrameErr
public org.opendaylight.yangtools.yang.common.Uint64 getRxFrameErr()
-
getRxOverErr
public org.opendaylight.yangtools.yang.common.Uint64 getRxOverErr()
-
getRxPackets
public org.opendaylight.yangtools.yang.common.Uint64 getRxPackets()
-
getTxBytes
public org.opendaylight.yangtools.yang.common.Uint64 getTxBytes()
-
getTxDropped
public org.opendaylight.yangtools.yang.common.Uint64 getTxDropped()
-
getTxErrors
public org.opendaylight.yangtools.yang.common.Uint64 getTxErrors()
-
getTxPackets
public org.opendaylight.yangtools.yang.common.Uint64 getTxPackets()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> E$$ augmentation(Class<E$$> augmentationType)
-
setCollisions
public PortStatsBuilder setCollisions(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setCollisions
@Deprecated(forRemoval=true) public PortStatsBuilder setCollisions(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetCollisions(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setDurationNsec
public PortStatsBuilder setDurationNsec(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setDurationNsec
@Deprecated(forRemoval=true) public PortStatsBuilder setDurationNsec(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDurationNsec(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setDurationSec
public PortStatsBuilder setDurationSec(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setDurationSec
@Deprecated(forRemoval=true) public PortStatsBuilder setDurationSec(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDurationSec(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setPortNo
public PortStatsBuilder setPortNo(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setPortNo
@Deprecated(forRemoval=true) public PortStatsBuilder setPortNo(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetPortNo(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxBytes
public PortStatsBuilder setRxBytes(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxBytes
@Deprecated(forRemoval=true) public PortStatsBuilder setRxBytes(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxBytes(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxCrcErr
public PortStatsBuilder setRxCrcErr(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxCrcErr
@Deprecated(forRemoval=true) public PortStatsBuilder setRxCrcErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxCrcErr(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxDropped
public PortStatsBuilder setRxDropped(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxDropped
@Deprecated(forRemoval=true) public PortStatsBuilder setRxDropped(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxDropped(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxErrors
public PortStatsBuilder setRxErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxErrors
@Deprecated(forRemoval=true) public PortStatsBuilder setRxErrors(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxErrors(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxFrameErr
public PortStatsBuilder setRxFrameErr(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxFrameErr
@Deprecated(forRemoval=true) public PortStatsBuilder setRxFrameErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxFrameErr(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxOverErr
public PortStatsBuilder setRxOverErr(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxOverErr
@Deprecated(forRemoval=true) public PortStatsBuilder setRxOverErr(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxOverErr(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRxPackets
public PortStatsBuilder setRxPackets(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setRxPackets
@Deprecated(forRemoval=true) public PortStatsBuilder setRxPackets(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetRxPackets(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setTxBytes
public PortStatsBuilder setTxBytes(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setTxBytes
@Deprecated(forRemoval=true) public PortStatsBuilder setTxBytes(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxBytes(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setTxDropped
public PortStatsBuilder setTxDropped(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setTxDropped
@Deprecated(forRemoval=true) public PortStatsBuilder setTxDropped(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxDropped(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setTxErrors
public PortStatsBuilder setTxErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setTxErrors
@Deprecated(forRemoval=true) public PortStatsBuilder setTxErrors(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxErrors(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setTxPackets
public PortStatsBuilder setTxPackets(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setTxPackets
@Deprecated(forRemoval=true) public PortStatsBuilder setTxPackets(BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetTxPackets(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
addAugmentation
public PortStatsBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<PortStats> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public PortStatsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType
- augmentation type to be removed- Returns:
- this builder
-
build
public PortStats build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<PortStats>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<PortStats,IllegalArgumentException>
-
-