public class DestinationBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Destination>
DestinationBuilder
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:
DestinationBuilder createTarget(int fooXyzzy, int barBaz) {
return new DestinationBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of DestinationBuilder, 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 methodDestinationBuilder
,
Builder
Constructor and Description |
---|
DestinationBuilder() |
DestinationBuilder(Destination base) |
DestinationBuilder(Endpoint arg) |
Modifier and Type | Method and Description |
---|---|
DestinationBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Destination> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> |
augmentation(Class<E$$> augmentationType) |
Destination |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
EndpointType |
getEndpointType() |
DestinationBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> augmentationType) |
DestinationBuilder |
setEndpointType(EndpointType value) |
public DestinationBuilder()
public DestinationBuilder(Endpoint arg)
public DestinationBuilder(Destination base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic EndpointType getEndpointType()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> E$$ augmentation(Class<E$$> augmentationType)
public DestinationBuilder setEndpointType(EndpointType value)
public DestinationBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Destination> augmentationValue)
public DestinationBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Destination>> augmentationType)
public Destination build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Destination,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.