public class PortsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Ports>
PortsBuilder
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:
PortsBuilder createTarget(int fooXyzzy, int barBaz) {
return new PortsBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of PortsBuilder, 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 methodPortsBuilder
,
Builder
Constructor and Description |
---|
PortsBuilder() |
PortsBuilder(CommonPort arg) |
PortsBuilder(FlowCapablePort arg) |
PortsBuilder(Ports base) |
PortsBuilder(Queues arg) |
Modifier and Type | Method and Description |
---|---|
PortsBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Ports> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> |
augmentation(Class<E$$> augmentationType) |
Ports |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
PortFeatures |
getAdvertisedFeatures() |
PortConfig |
getConfiguration() |
PortFeatures |
getCurrentFeature() |
Long |
getCurrentSpeed() |
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress |
getHardwareAddress() |
Long |
getMaximumSpeed() |
String |
getName() |
PortFeatures |
getPeerFeatures() |
PortNumberUni |
getPortNumber() |
List<Queue> |
getQueue() |
State |
getState() |
PortFeatures |
getSupported() |
PortsBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> augmentationType) |
PortsBuilder |
setAdvertisedFeatures(PortFeatures value) |
PortsBuilder |
setConfiguration(PortConfig value) |
PortsBuilder |
setCurrentFeature(PortFeatures value) |
PortsBuilder |
setCurrentSpeed(Long value) |
PortsBuilder |
setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) |
PortsBuilder |
setMaximumSpeed(Long value) |
PortsBuilder |
setName(String value) |
PortsBuilder |
setPeerFeatures(PortFeatures value) |
PortsBuilder |
setPortNumber(PortNumberUni value) |
PortsBuilder |
setQueue(List<Queue> values) |
PortsBuilder |
setState(State value) |
PortsBuilder |
setSupported(PortFeatures value) |
public PortsBuilder()
public PortsBuilder(FlowCapablePort arg)
public PortsBuilder(Queues arg)
public PortsBuilder(CommonPort arg)
public PortsBuilder(Ports 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 PortFeatures getCurrentFeature()
public Long getCurrentSpeed()
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getHardwareAddress()
public Long getMaximumSpeed()
public String getName()
public PortFeatures getPeerFeatures()
public PortNumberUni getPortNumber()
public State getState()
public PortFeatures getSupported()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> E$$ augmentation(Class<E$$> augmentationType)
public PortsBuilder setAdvertisedFeatures(PortFeatures value)
public PortsBuilder setConfiguration(PortConfig value)
public PortsBuilder setCurrentFeature(PortFeatures value)
public PortsBuilder setCurrentSpeed(Long value)
public PortsBuilder setHardwareAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
public PortsBuilder setMaximumSpeed(Long value)
public PortsBuilder setName(String value)
public PortsBuilder setPeerFeatures(PortFeatures value)
public PortsBuilder setPortNumber(PortNumberUni value)
public PortsBuilder setQueue(List<Queue> values)
public PortsBuilder setState(State value)
public PortsBuilder setSupported(PortFeatures value)
public PortsBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Ports> augmentationValue)
public PortsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Ports>> augmentationType)
public Ports build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Ports,IllegalArgumentException>
Copyright © 2020 OpenDaylight. All rights reserved.