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(CommonPort arg) |
PortBuilder(CommonPortWithMask arg) |
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() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
PortFeatures |
getAdvertisedFeatures() |
PortConfig |
getConfiguration() |
String |
getContainerName() |
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress |
getHardwareAddress() |
PortConfig |
getMask() |
Long |
getPortModOrder() |
String |
getPortName() |
PortNumberUni |
getPortNumber() |
Boolean |
isBarrier() |
PortKey |
key() |
PortBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Port>> augmentationType) |
PortBuilder |
setAdvertisedFeatures(PortFeatures value) |
PortBuilder |
setBarrier(Boolean value) |
PortBuilder |
setConfiguration(PortConfig value) |
PortBuilder |
setContainerName(String value) |
PortBuilder |
setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) |
PortBuilder |
setMask(PortConfig value) |
PortBuilder |
setPortModOrder(Long value) |
PortBuilder |
setPortName(String value) |
PortBuilder |
setPortNumber(PortNumberUni value) |
PortBuilder |
withKey(PortKey key) |
public PortBuilder()
public PortBuilder(CommonPortWithMask arg)
public PortBuilder(CommonPort arg)
public PortBuilder(Port base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg
- grouping objectIllegalArgumentException
- if given argument is none of valid typespublic PortKey key()
public PortFeatures getAdvertisedFeatures()
public PortConfig getConfiguration()
public String getContainerName()
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getHardwareAddress()
public PortConfig getMask()
public Long getPortModOrder()
public String getPortName()
public PortNumberUni getPortNumber()
public Boolean isBarrier()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Port>> E$$ augmentation(Class<E$$> augmentationType)
public PortBuilder withKey(PortKey key)
public PortBuilder setAdvertisedFeatures(PortFeatures value)
public PortBuilder setConfiguration(PortConfig value)
public PortBuilder setContainerName(String value)
public PortBuilder setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
public PortBuilder setMask(PortConfig value)
public PortBuilder setPortModOrder(Long value)
public PortBuilder setPortName(String value)
public PortBuilder setPortNumber(PortNumberUni value)
public PortBuilder setBarrier(Boolean value)
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.