public class TopologyTypeBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<TopologyType>
TopologyTypeBuilder
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:
TopologyTypeBuilder createTarget(int fooXyzzy, int barBaz) {
return new TopologyTypeBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of TopologyTypeBuilder, 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 methodTopologyTypeBuilder
,
Builder
Constructor and Description |
---|
TopologyTypeBuilder() |
TopologyTypeBuilder(TopologyType base) |
TopologyTypeBuilder(TopologyTypeAttributes arg) |
Modifier and Type | Method and Description |
---|---|
TopologyType |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
Class<? extends TopologyTypeBase> |
getTopologyType() |
TopologyTypeBuilder |
setTopologyType(Class<? extends TopologyTypeBase> value) |
public TopologyTypeBuilder()
public TopologyTypeBuilder(TopologyTypeAttributes arg)
public TopologyTypeBuilder(TopologyType base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic Class<? extends TopologyTypeBase> getTopologyType()
public TopologyTypeBuilder setTopologyType(Class<? extends TopologyTypeBase> value)
public TopologyType build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<TopologyType,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.