public class BandsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Bands>
BandsBuilder
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:
BandsBuilder createTarget(int fooXyzzy, int barBaz) {
return new BandsBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of BandsBuilder, 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 methodBandsBuilder
,
Builder
Constructor and Description |
---|
BandsBuilder() |
BandsBuilder(Bands base) |
BandsBuilder(MeterBandHeader arg) |
Modifier and Type | Method and Description |
---|---|
BandsBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Bands> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> |
augmentation(Class<E$$> augmentationType) |
Bands |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
MeterBand |
getMeterBand() |
BandsBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> augmentationType) |
BandsBuilder |
setMeterBand(MeterBand value) |
public BandsBuilder()
public BandsBuilder(MeterBandHeader arg)
public BandsBuilder(Bands base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic MeterBand getMeterBand()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> E$$ augmentation(Class<E$$> augmentationType)
public BandsBuilder setMeterBand(MeterBand value)
public BandsBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Bands> augmentationValue)
public BandsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Bands>> augmentationType)
public Bands build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Bands,IllegalArgumentException>
Copyright © 2020 OpenDaylight. All rights reserved.