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 buildsGetNodeConnectorStatisticsOutput
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:
GetNodeConnectorStatisticsOutput
- 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 GetNodeConnectorStatisticsOutputBuilder()
Construct an empty builder.GetNodeConnectorStatisticsOutputBuilder(TransactionAware arg)
Construct a new builder initialized from specifiedTransactionAware
.GetNodeConnectorStatisticsOutputBuilder(Duration arg)
Construct a new builder initialized from specifiedDuration
.GetNodeConnectorStatisticsOutputBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.GetNodeConnectorStatisticsOutputBuilder(GetNodeConnectorStatisticsOutput base)
Construct a builder initialized with state from specifiedGetNodeConnectorStatisticsOutput
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetNodeConnectorStatisticsOutputBuilder
addAugmentation(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.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()
.TransactionId
getTransactionId()
Return current value associated with the property corresponding toTransactionAware.getTransactionId()
.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()
.GetNodeConnectorStatisticsOutputBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<GetNodeConnectorStatisticsOutput>> augmentationType)
Remove an augmentation from this builder's product.GetNodeConnectorStatisticsOutputBuilder
setBytes(Bytes value)
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setCollisionCount(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getCollisionCount()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setPackets(Packets value)
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setReceiveCrcError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setReceiveDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveDrops()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setReceiveErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveErrors()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setReceiveFrameError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setReceiveOverRunError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setTransactionId(TransactionId value)
Set the property corresponding toTransactionAware.getTransactionId()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setTransmitDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitDrops()
to the specified value.GetNodeConnectorStatisticsOutputBuilder
setTransmitErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitErrors()
to the specified value.
-
-
-
Constructor Detail
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder()
Construct an empty builder.
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.- Parameters:
arg
- NodeConnectorStatistics from which the builder should be initialized
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder(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
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder(TransactionAware arg)
Construct a new builder initialized from specifiedTransactionAware
.- Parameters:
arg
- TransactionAware from which the builder should be initialized
-
GetNodeConnectorStatisticsOutputBuilder
public GetNodeConnectorStatisticsOutputBuilder(GetNodeConnectorStatisticsOutput base)
Construct a builder initialized with state from specifiedGetNodeConnectorStatisticsOutput
.- Parameters:
base
- GetNodeConnectorStatisticsOutput 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
-
getTransactionId
public TransactionId 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
public GetNodeConnectorStatisticsOutputBuilder setBytes(Bytes value)
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
public GetNodeConnectorStatisticsOutputBuilder setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPackets
public GetNodeConnectorStatisticsOutputBuilder setPackets(Packets value)
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
public GetNodeConnectorStatisticsOutputBuilder setTransactionId(TransactionId value)
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
public @NonNull GetNodeConnectorStatisticsOutput build()
A newGetNodeConnectorStatisticsOutput
instance.- Returns:
- A new
GetNodeConnectorStatisticsOutput
instance.
-
-