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(Object arg) |
MetricBuilder(ObjectHeader 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.
|
Short |
getMetricType() |
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ieee754.rev130819.Float32 |
getValue() |
Boolean |
isBound() |
Boolean |
isComputed() |
Boolean |
isIgnore() |
Boolean |
isProcessingRule() |
MetricBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> augmentationType) |
MetricBuilder |
setBound(Boolean value) |
MetricBuilder |
setComputed(Boolean value) |
MetricBuilder |
setIgnore(Boolean value) |
MetricBuilder |
setMetricType(Short value) |
MetricBuilder |
setProcessingRule(Boolean value) |
MetricBuilder |
setValue(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ieee754.rev130819.Float32 value) |
public MetricBuilder()
public MetricBuilder(Object arg)
public MetricBuilder(ObjectHeader 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 Short getMetricType()
public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ieee754.rev130819.Float32 getValue()
public Boolean isBound()
public Boolean isComputed()
public Boolean isIgnore()
public Boolean isProcessingRule()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Metric>> E$$ augmentation(Class<E$$> augmentationType)
public MetricBuilder setMetricType(Short value)
public MetricBuilder setValue(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ieee754.rev130819.Float32 value)
public MetricBuilder setBound(Boolean value)
public MetricBuilder setComputed(Boolean value)
public MetricBuilder setIgnore(Boolean value)
public MetricBuilder setProcessingRule(Boolean 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.