public class MappingsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Mappings>
MappingsBuilder
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:
MappingsBuilder createTarget(int fooXyzzy, int barBaz) {
return new MappingsBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of MappingsBuilder, 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 methodMappingsBuilder
,
Builder
Constructor and Description |
---|
MappingsBuilder() |
MappingsBuilder(Mappings base) |
Modifier and Type | Method and Description |
---|---|
MappingsBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Mappings> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> |
augmentation(Class<E$$> augmentationType) |
Mappings |
build() |
Long |
getMappingsKey() |
Integer |
getMappingsValue() |
MappingsKey |
key() |
MappingsBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> augmentationType) |
MappingsBuilder |
setMappingsKey(Long value) |
MappingsBuilder |
setMappingsValue(Integer value) |
MappingsBuilder |
withKey(MappingsKey key) |
public MappingsBuilder()
public MappingsBuilder(Mappings base)
public MappingsKey key()
public Long getMappingsKey()
public Integer getMappingsValue()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> E$$ augmentation(Class<E$$> augmentationType)
public MappingsBuilder withKey(MappingsKey key)
public MappingsBuilder setMappingsKey(Long value)
public MappingsBuilder setMappingsValue(Integer value)
public MappingsBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Mappings> augmentationValue)
public MappingsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Mappings>> augmentationType)
public Mappings build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Mappings,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.