Class FlowCapableNodeConnectorStatisticsBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.flow.capable.node.connector.statistics.FlowCapableNodeConnectorStatisticsBuilder
-
@Generated("mdsal-binding-generator") public class FlowCapableNodeConnectorStatisticsBuilder extends Object
Class that buildsFlowCapableNodeConnectorStatistics
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:
FlowCapableNodeConnectorStatistics createFlowCapableNodeConnectorStatistics(int fooXyzzy, int barBaz) { return new FlowCapableNodeConnectorStatisticsBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of FlowCapableNodeConnectorStatistics, 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 opportunities, 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:
FlowCapableNodeConnectorStatistics
- 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
-
-
Constructor Summary
Constructors Constructor Description FlowCapableNodeConnectorStatisticsBuilder()
Construct an empty builder.FlowCapableNodeConnectorStatisticsBuilder(Duration arg)
Construct a new builder initialized from specifiedDuration
.FlowCapableNodeConnectorStatisticsBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.FlowCapableNodeConnectorStatisticsBuilder(FlowCapableNodeConnectorStatistics base)
Construct a builder initialized with state from specifiedFlowCapableNodeConnectorStatistics
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowCapableNodeConnectorStatisticsBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics>>
E$$augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.@NonNull FlowCapableNodeConnectorStatistics
build()
A newFlowCapableNodeConnectorStatistics
instance.void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.Bytes
getBytes()
Return current value associated with the property corresponding toNodeConnectorStatistics.getBytes()
.org.opendaylight.yangtools.yang.common.Uint64
getCollisionCount()
Return current value associated with the property corresponding toNodeConnectorStatistics.getCollisionCount()
.Duration
getDuration()
Return current value associated with the property corresponding toDuration.getDuration()
.Packets
getPackets()
Return current value associated with the property corresponding toNodeConnectorStatistics.getPackets()
.org.opendaylight.yangtools.yang.common.Uint64
getReceiveCrcError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
.org.opendaylight.yangtools.yang.common.Uint64
getReceiveDrops()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveDrops()
.org.opendaylight.yangtools.yang.common.Uint64
getReceiveErrors()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveErrors()
.org.opendaylight.yangtools.yang.common.Uint64
getReceiveFrameError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
.org.opendaylight.yangtools.yang.common.Uint64
getReceiveOverRunError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
.org.opendaylight.yangtools.yang.common.Uint64
getTransmitDrops()
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitDrops()
.org.opendaylight.yangtools.yang.common.Uint64
getTransmitErrors()
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitErrors()
.FlowCapableNodeConnectorStatisticsBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics>> augmentationType)
Remove an augmentation from this builder's product.FlowCapableNodeConnectorStatisticsBuilder
setBytes(Bytes value)
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setCollisionCount(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getCollisionCount()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setPackets(Packets value)
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setReceiveCrcError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setReceiveDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveDrops()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setReceiveErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveErrors()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setReceiveFrameError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setReceiveOverRunError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setTransmitDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitDrops()
to the specified value.FlowCapableNodeConnectorStatisticsBuilder
setTransmitErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitErrors()
to the specified value.
-
-
-
Constructor Detail
-
FlowCapableNodeConnectorStatisticsBuilder
public FlowCapableNodeConnectorStatisticsBuilder()
Construct an empty builder.
-
FlowCapableNodeConnectorStatisticsBuilder
public FlowCapableNodeConnectorStatisticsBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.- Parameters:
arg
- NodeConnectorStatistics from which the builder should be initialized
-
FlowCapableNodeConnectorStatisticsBuilder
public FlowCapableNodeConnectorStatisticsBuilder(Duration arg)
Construct a new builder initialized from specifiedDuration
.- Parameters:
arg
- org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.Duration from which the builder should be initialized
-
FlowCapableNodeConnectorStatisticsBuilder
public FlowCapableNodeConnectorStatisticsBuilder(FlowCapableNodeConnectorStatistics base)
Construct a builder initialized with state from specifiedFlowCapableNodeConnectorStatistics
.- Parameters:
base
- FlowCapableNodeConnectorStatistics from which the builder should be initialized
-
-
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:- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getBytes
public Bytes getBytes()
Return current value associated with the property corresponding toNodeConnectorStatistics.getBytes()
.- Returns:
- current value
-
getCollisionCount
public org.opendaylight.yangtools.yang.common.Uint64 getCollisionCount()
Return current value associated with the property corresponding toNodeConnectorStatistics.getCollisionCount()
.- Returns:
- current value
-
getDuration
public Duration getDuration()
Return current value associated with the property corresponding toDuration.getDuration()
.- Returns:
- current value
-
getPackets
public Packets getPackets()
Return current value associated with the property corresponding toNodeConnectorStatistics.getPackets()
.- Returns:
- current value
-
getReceiveCrcError
public org.opendaylight.yangtools.yang.common.Uint64 getReceiveCrcError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
.- Returns:
- current value
-
getReceiveDrops
public org.opendaylight.yangtools.yang.common.Uint64 getReceiveDrops()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveDrops()
.- Returns:
- current value
-
getReceiveErrors
public org.opendaylight.yangtools.yang.common.Uint64 getReceiveErrors()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveErrors()
.- Returns:
- current value
-
getReceiveFrameError
public org.opendaylight.yangtools.yang.common.Uint64 getReceiveFrameError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
.- Returns:
- current value
-
getReceiveOverRunError
public org.opendaylight.yangtools.yang.common.Uint64 getReceiveOverRunError()
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
.- Returns:
- current value
-
getTransmitDrops
public org.opendaylight.yangtools.yang.common.Uint64 getTransmitDrops()
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitDrops()
.- Returns:
- current value
-
getTransmitErrors
public org.opendaylight.yangtools.yang.common.Uint64 getTransmitErrors()
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitErrors()
.- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics>> E$$ augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.- Type Parameters:
E$$
- augmentation type- Parameters:
augmentationType
- augmentation type class- Returns:
- Augmentation object from this builder, or
null
if not present - Throws:
NullPointerException
- ifaugmentType
isnull
-
setBytes
public FlowCapableNodeConnectorStatisticsBuilder setBytes(Bytes value)
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setCollisionCount
public FlowCapableNodeConnectorStatisticsBuilder setCollisionCount(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getCollisionCount()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDuration
public FlowCapableNodeConnectorStatisticsBuilder setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPackets
public FlowCapableNodeConnectorStatisticsBuilder setPackets(Packets value)
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveCrcError
public FlowCapableNodeConnectorStatisticsBuilder setReceiveCrcError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveDrops
public FlowCapableNodeConnectorStatisticsBuilder setReceiveDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveDrops()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveErrors
public FlowCapableNodeConnectorStatisticsBuilder setReceiveErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveErrors()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveFrameError
public FlowCapableNodeConnectorStatisticsBuilder setReceiveFrameError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveOverRunError
public FlowCapableNodeConnectorStatisticsBuilder setReceiveOverRunError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTransmitDrops
public FlowCapableNodeConnectorStatisticsBuilder setTransmitDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitDrops()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTransmitErrors
public FlowCapableNodeConnectorStatisticsBuilder setTransmitErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitErrors()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
addAugmentation
public FlowCapableNodeConnectorStatisticsBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics> 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 FlowCapableNodeConnectorStatisticsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<FlowCapableNodeConnectorStatistics>> 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 @NonNull FlowCapableNodeConnectorStatistics build()
A newFlowCapableNodeConnectorStatistics
instance.- Returns:
- A new
FlowCapableNodeConnectorStatistics
instance.
-
-