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