public class PortMessageBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<PortMessage>
PortMessageBuilder
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:
PortMessageBuilder createTarget(int fooXyzzy, int barBaz) {
return new PortMessageBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of PortMessageBuilder, 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 methodPortMessageBuilder
,
Builder
Constructor and Description |
---|
PortMessageBuilder() |
PortMessageBuilder(CommonPort arg) |
PortMessageBuilder(CommonPortWithMask arg) |
PortMessageBuilder(OfHeader arg) |
PortMessageBuilder(PortMessage base) |
Modifier and Type | Method and Description |
---|---|
PortMessageBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> |
augmentation(Class<E$$> augmentationType) |
PortMessage |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
PortFeatures |
getAdvertisedFeatures() |
PortConfig |
getConfiguration() |
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress |
getHardwareAddress() |
PortConfig |
getMask() |
PortNumberUni |
getPortNumber() |
Short |
getVersion() |
Long |
getXid() |
PortMessageBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> augmentationType) |
PortMessageBuilder |
setAdvertisedFeatures(PortFeatures value) |
PortMessageBuilder |
setConfiguration(PortConfig value) |
PortMessageBuilder |
setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) |
PortMessageBuilder |
setMask(PortConfig value) |
PortMessageBuilder |
setPortNumber(PortNumberUni value) |
PortMessageBuilder |
setVersion(Short value) |
PortMessageBuilder |
setXid(Long value) |
public PortMessageBuilder()
public PortMessageBuilder(CommonPortWithMask arg)
public PortMessageBuilder(CommonPort arg)
public PortMessageBuilder(OfHeader arg)
public PortMessageBuilder(PortMessage base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic PortFeatures getAdvertisedFeatures()
public PortConfig getConfiguration()
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getHardwareAddress()
public PortConfig getMask()
public PortNumberUni getPortNumber()
public Short getVersion()
public Long getXid()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> E$$ augmentation(Class<E$$> augmentationType)
public PortMessageBuilder setAdvertisedFeatures(PortFeatures value)
public PortMessageBuilder setConfiguration(PortConfig value)
public PortMessageBuilder setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
public PortMessageBuilder setMask(PortConfig value)
public PortMessageBuilder setPortNumber(PortNumberUni value)
public PortMessageBuilder setVersion(Short value)
public PortMessageBuilder setXid(Long value)
public PortMessageBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage> augmentationValue)
public PortMessageBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortMessage>> augmentationType)
public PortMessage build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<PortMessage,IllegalArgumentException>
Copyright © 2020 OpenDaylight. All rights reserved.