public class ConfigBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Config>
ConfigBuilder
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:
ConfigBuilder createTarget(int fooXyzzy, int barBaz) {
return new ConfigBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of ConfigBuilder, 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 methodConfigBuilder
,
Builder
Constructor and Description |
---|
ConfigBuilder() |
ConfigBuilder(Config base) |
Modifier and Type | Method and Description |
---|---|
ConfigBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Config> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> |
augmentation(Class<E$$> augmentationType) |
Config |
build() |
Boolean |
isUpgradeInProgress() |
ConfigBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> augmentationType) |
ConfigBuilder |
setUpgradeInProgress(Boolean value) |
public ConfigBuilder()
public ConfigBuilder(Config base)
public Boolean isUpgradeInProgress()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> E$$ augmentation(Class<E$$> augmentationType)
public ConfigBuilder setUpgradeInProgress(Boolean value)
public ConfigBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Config> augmentationValue)
public ConfigBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Config>> augmentationType)
public Config build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Config,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.