public class MetricBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Metric>
MetricBuilder 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:
MetricBuilder createTarget(int fooXyzzy, int barBaz) {
return new MetricBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of MetricBuilder, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
build(), which is then returned from the methodMetricBuilder,
Builder| Constructor and Description |
|---|
MetricBuilder() |
MetricBuilder(Metric base) |
MetricBuilder(MetricObject arg) |
| Modifier and Type | Method and Description |
|---|---|
MetricBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Metric> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> |
augmentation(Class<E$$> augmentationType) |
Metric |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
Metric |
getMetric() |
MetricBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> augmentationType) |
MetricBuilder |
setMetric(Metric value) |
public MetricBuilder()
public MetricBuilder(MetricObject arg)
public MetricBuilder(Metric base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg - grouping objectIllegalArgumentException - if given argument is none of valid typespublic Metric getMetric()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> E$$ augmentation(Class<E$$> augmentationType)
public MetricBuilder setMetric(Metric value)
public MetricBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Metric> augmentationValue)
public MetricBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> augmentationType)
public Metric build()
build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Metric,IllegalArgumentException>Copyright © 2020 OpenDaylight. All rights reserved.