Class GetNodeConnectorStatisticsOutputBuilder
java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsOutputBuilder
@Generated("mdsal-binding-generator")
public class GetNodeConnectorStatisticsOutputBuilder
extends Object
Class that builds
GetNodeConnectorStatisticsOutput
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:
GetNodeConnectorStatisticsOutput createGetNodeConnectorStatisticsOutput(int fooXyzzy, int barBaz) {
return new GetNodeConnectorStatisticsOutputBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of GetNodeConnectorStatisticsOutput, 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:
-
Constructor Summary
ConstructorDescriptionConstruct an empty builder.Construct a new builder initialized from specifiedTransactionAware
.Construct a new builder initialized from specifiedDuration
.Construct a new builder initialized from specifiedNodeConnectorStatistics
.Construct a builder initialized with state from specifiedGetNodeConnectorStatisticsOutput
. -
Method Summary
Modifier and TypeMethodDescriptionaddAugmentation
(org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput> augmentation) Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput>>
E$$augmentation
(Class<E$$> augmentationType) Return the specified augmentation, if it is present in this builder.@NonNull GetNodeConnectorStatisticsOutput
build()
A newGetNodeConnectorStatisticsOutput
instance.void
fieldsFrom
(org.opendaylight.yangtools.yang.binding.DataObject arg) Set fields from given grouping argument.getBytes()
Return current value associated with the property corresponding toNodeConnectorStatistics.getBytes()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getCollisionCount()
.Return current value associated with the property corresponding toDuration.getDuration()
.Return current value associated with the property corresponding toNodeConnectorStatistics.getPackets()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveDrops()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveErrors()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
.Return current value associated with the property corresponding toTransactionAware.getTransactionId()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitDrops()
.org.opendaylight.yangtools.yang.common.Uint64
Return current value associated with the property corresponding toNodeConnectorStatistics.getTransmitErrors()
.removeAugmentation
(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput>> augmentationType) Remove an augmentation from this builder's product.Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.setCollisionCount
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getCollisionCount()
to the specified value.setDuration
(Duration value) Set the property corresponding toDuration.getDuration()
to the specified value.setPackets
(Packets value) Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.setReceiveCrcError
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
to the specified value.setReceiveDrops
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getReceiveDrops()
to the specified value.setReceiveErrors
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getReceiveErrors()
to the specified value.setReceiveFrameError
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
to the specified value.setReceiveOverRunError
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
to the specified value.setTransactionId
(TransactionId value) Set the property corresponding toTransactionAware.getTransactionId()
to the specified value.setTransmitDrops
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getTransmitDrops()
to the specified value.setTransmitErrors
(org.opendaylight.yangtools.yang.common.Uint64 value) Set the property corresponding toNodeConnectorStatistics.getTransmitErrors()
to the specified value.
-
Constructor Details
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder()Construct an empty builder. -
GetNodeConnectorStatisticsOutputBuilder
Construct a new builder initialized from specifiedNodeConnectorStatistics
.- Parameters:
arg
- NodeConnectorStatistics from which the builder should be initialized
-
GetNodeConnectorStatisticsOutputBuilder
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
-
GetNodeConnectorStatisticsOutputBuilder
Construct a new builder initialized from specifiedTransactionAware
.- Parameters:
arg
- TransactionAware from which the builder should be initialized
-
GetNodeConnectorStatisticsOutputBuilder
Construct a builder initialized with state from specifiedGetNodeConnectorStatisticsOutput
.- Parameters:
base
- GetNodeConnectorStatisticsOutput from which the builder should be initialized
-
-
Method Details
-
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
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
Return current value associated with the property corresponding toDuration.getDuration()
.- Returns:
- current value
-
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
-
getTransactionId
Return current value associated with the property corresponding toTransactionAware.getTransactionId()
.- 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<GetNodeConnectorStatisticsOutput>> 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
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setCollisionCount
public GetNodeConnectorStatisticsOutputBuilder 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
Set the property corresponding toDuration.getDuration()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPackets
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveCrcError
public GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder 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
-
setTransactionId
Set the property corresponding toTransactionAware.getTransactionId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTransmitDrops
public GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder 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 GetNodeConnectorStatisticsOutputBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput> 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 GetNodeConnectorStatisticsOutputBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput>> 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
A newGetNodeConnectorStatisticsOutput
instance.- Returns:
- A new
GetNodeConnectorStatisticsOutput
instance.
-