Class NodeConnectorStatisticsAndPortNumberMapBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.node.connector.statistics.and.port.number.map.NodeConnectorStatisticsAndPortNumberMapBuilder
-
@Generated("mdsal-binding-generator") public class NodeConnectorStatisticsAndPortNumberMapBuilder extends Object
Class that buildsNodeConnectorStatisticsAndPortNumberMap
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:
NodeConnectorStatisticsAndPortNumberMap createNodeConnectorStatisticsAndPortNumberMap(int fooXyzzy, int barBaz) { return new NodeConnectorStatisticsAndPortNumberMapBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of NodeConnectorStatisticsAndPortNumberMap, 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:
NodeConnectorStatisticsAndPortNumberMap
- 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 NodeConnectorStatisticsAndPortNumberMapBuilder()
Construct an empty builder.NodeConnectorStatisticsAndPortNumberMapBuilder(Duration arg)
Construct a new builder initialized from specifiedDuration
.NodeConnectorStatisticsAndPortNumberMapBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.NodeConnectorStatisticsAndPortNumberMapBuilder(NodeConnectorStatisticsAndPortNumberMap base)
Construct a builder initialized with state from specifiedNodeConnectorStatisticsAndPortNumberMap
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeConnectorStatisticsAndPortNumberMapBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<NodeConnectorStatisticsAndPortNumberMap> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<NodeConnectorStatisticsAndPortNumberMap>>
E$$augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.@NonNull NodeConnectorStatisticsAndPortNumberMap
build()
A newNodeConnectorStatisticsAndPortNumberMap
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()
.NodeConnectorId
getNodeConnectorId()
Return current value associated with the property corresponding toNodeConnectorStatisticsAndPortNumberMap.getNodeConnectorId()
.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()
.NodeConnectorStatisticsAndPortNumberMapKey
key()
Return current value associated with the property corresponding toNodeConnectorStatisticsAndPortNumberMap.key()
.NodeConnectorStatisticsAndPortNumberMapBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NodeConnectorStatisticsAndPortNumberMap>> augmentationType)
Remove an augmentation from this builder's product.NodeConnectorStatisticsAndPortNumberMapBuilder
setBytes(Bytes value)
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setCollisionCount(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getCollisionCount()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setNodeConnectorId(NodeConnectorId value)
Set the property corresponding toNodeConnectorStatisticsAndPortNumberMap.getNodeConnectorId()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setPackets(Packets value)
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setReceiveCrcError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveCrcError()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setReceiveDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveDrops()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setReceiveErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveErrors()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setReceiveFrameError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveFrameError()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setReceiveOverRunError(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getReceiveOverRunError()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setTransmitDrops(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitDrops()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
setTransmitErrors(org.opendaylight.yangtools.yang.common.Uint64 value)
Set the property corresponding toNodeConnectorStatistics.getTransmitErrors()
to the specified value.NodeConnectorStatisticsAndPortNumberMapBuilder
withKey(NodeConnectorStatisticsAndPortNumberMapKey key)
-
-
-
Constructor Detail
-
NodeConnectorStatisticsAndPortNumberMapBuilder
public NodeConnectorStatisticsAndPortNumberMapBuilder()
Construct an empty builder.
-
NodeConnectorStatisticsAndPortNumberMapBuilder
public NodeConnectorStatisticsAndPortNumberMapBuilder(NodeConnectorStatistics arg)
Construct a new builder initialized from specifiedNodeConnectorStatistics
.- Parameters:
arg
- NodeConnectorStatistics from which the builder should be initialized
-
NodeConnectorStatisticsAndPortNumberMapBuilder
public NodeConnectorStatisticsAndPortNumberMapBuilder(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
-
NodeConnectorStatisticsAndPortNumberMapBuilder
public NodeConnectorStatisticsAndPortNumberMapBuilder(NodeConnectorStatisticsAndPortNumberMap base)
Construct a builder initialized with state from specifiedNodeConnectorStatisticsAndPortNumberMap
.- Parameters:
base
- NodeConnectorStatisticsAndPortNumberMap 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
-
key
public NodeConnectorStatisticsAndPortNumberMapKey key()
Return current value associated with the property corresponding toNodeConnectorStatisticsAndPortNumberMap.key()
.- Returns:
- current 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
-
getNodeConnectorId
public NodeConnectorId getNodeConnectorId()
Return current value associated with the property corresponding toNodeConnectorStatisticsAndPortNumberMap.getNodeConnectorId()
.- 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<NodeConnectorStatisticsAndPortNumberMap>> 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
-
withKey
public NodeConnectorStatisticsAndPortNumberMapBuilder withKey(NodeConnectorStatisticsAndPortNumberMapKey key)
-
setBytes
public NodeConnectorStatisticsAndPortNumberMapBuilder setBytes(Bytes value)
Set the property corresponding toNodeConnectorStatistics.getBytes()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setCollisionCount
public NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder setDuration(Duration value)
Set the property corresponding toDuration.getDuration()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNodeConnectorId
public NodeConnectorStatisticsAndPortNumberMapBuilder setNodeConnectorId(NodeConnectorId value)
Set the property corresponding toNodeConnectorStatisticsAndPortNumberMap.getNodeConnectorId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setPackets
public NodeConnectorStatisticsAndPortNumberMapBuilder setPackets(Packets value)
Set the property corresponding toNodeConnectorStatistics.getPackets()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setReceiveCrcError
public NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder 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 NodeConnectorStatisticsAndPortNumberMapBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<NodeConnectorStatisticsAndPortNumberMap> 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 NodeConnectorStatisticsAndPortNumberMapBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<NodeConnectorStatisticsAndPortNumberMap>> 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 NodeConnectorStatisticsAndPortNumberMap build()
A newNodeConnectorStatisticsAndPortNumberMap
instance.- Returns:
- A new
NodeConnectorStatisticsAndPortNumberMap
instance.
-
-