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