Class PhyPortBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.features.reply.PhyPortBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<PhyPort>
,org.opendaylight.yangtools.concepts.CheckedBuilder<PhyPort,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class PhyPortBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<PhyPort>
Class that buildsPhyPortBuilder
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:
PhyPortBuilder createTarget(int fooXyzzy, int barBaz) { return new PhyPortBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of PhyPortBuilder, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
build()
, which is then returned from the method - better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
- better optimization oportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
- See Also:
PhyPortBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description PhyPortBuilder()
PhyPortBuilder(PhyPort base)
PhyPortBuilder(PortGrouping arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PhyPortBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>>
E$$augmentation(Class<E$$> augmentationType)
PhyPort
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.PortFeatures
getAdvertisedFeatures()
PortFeaturesV10
getAdvertisedFeaturesV10()
PortConfig
getConfig()
PortConfigV10
getConfigV10()
PortFeatures
getCurrentFeatures()
PortFeaturesV10
getCurrentFeaturesV10()
org.opendaylight.yangtools.yang.common.Uint32
getCurrSpeed()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
getHwAddr()
org.opendaylight.yangtools.yang.common.Uint32
getMaxSpeed()
String
getName()
PortFeatures
getPeerFeatures()
PortFeaturesV10
getPeerFeaturesV10()
org.opendaylight.yangtools.yang.common.Uint32
getPortNo()
PortState
getState()
PortStateV10
getStateV10()
PortFeatures
getSupportedFeatures()
PortFeaturesV10
getSupportedFeaturesV10()
PhyPortBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>> augmentationType)
PhyPortBuilder
setAdvertisedFeatures(PortFeatures value)
PhyPortBuilder
setAdvertisedFeaturesV10(PortFeaturesV10 value)
PhyPortBuilder
setConfig(PortConfig value)
PhyPortBuilder
setConfigV10(PortConfigV10 value)
PhyPortBuilder
setCurrentFeatures(PortFeatures value)
PhyPortBuilder
setCurrentFeaturesV10(PortFeaturesV10 value)
PhyPortBuilder
setCurrSpeed(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setCurrSpeed(Uint32)} instead.PhyPortBuilder
setCurrSpeed(org.opendaylight.yangtools.yang.common.Uint32 value)
PhyPortBuilder
setHwAddr(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
PhyPortBuilder
setMaxSpeed(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMaxSpeed(Uint32)} instead.PhyPortBuilder
setMaxSpeed(org.opendaylight.yangtools.yang.common.Uint32 value)
PhyPortBuilder
setName(String value)
PhyPortBuilder
setPeerFeatures(PortFeatures value)
PhyPortBuilder
setPeerFeaturesV10(PortFeaturesV10 value)
PhyPortBuilder
setPortNo(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setPortNo(Uint32)} instead.PhyPortBuilder
setPortNo(org.opendaylight.yangtools.yang.common.Uint32 value)
PhyPortBuilder
setState(PortState value)
PhyPortBuilder
setStateV10(PortStateV10 value)
PhyPortBuilder
setSupportedFeatures(PortFeatures value)
PhyPortBuilder
setSupportedFeaturesV10(PortFeaturesV10 value)
-
-
-
Constructor Detail
-
PhyPortBuilder
public PhyPortBuilder()
-
PhyPortBuilder
public PhyPortBuilder(PortGrouping arg)
-
PhyPortBuilder
public PhyPortBuilder(PhyPort base)
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
getAdvertisedFeatures
public PortFeatures getAdvertisedFeatures()
-
getAdvertisedFeaturesV10
public PortFeaturesV10 getAdvertisedFeaturesV10()
-
getConfig
public PortConfig getConfig()
-
getConfigV10
public PortConfigV10 getConfigV10()
-
getCurrSpeed
public org.opendaylight.yangtools.yang.common.Uint32 getCurrSpeed()
-
getCurrentFeatures
public PortFeatures getCurrentFeatures()
-
getCurrentFeaturesV10
public PortFeaturesV10 getCurrentFeaturesV10()
-
getHwAddr
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getHwAddr()
-
getMaxSpeed
public org.opendaylight.yangtools.yang.common.Uint32 getMaxSpeed()
-
getName
public String getName()
-
getPeerFeatures
public PortFeatures getPeerFeatures()
-
getPeerFeaturesV10
public PortFeaturesV10 getPeerFeaturesV10()
-
getPortNo
public org.opendaylight.yangtools.yang.common.Uint32 getPortNo()
-
getState
public PortState getState()
-
getStateV10
public PortStateV10 getStateV10()
-
getSupportedFeatures
public PortFeatures getSupportedFeatures()
-
getSupportedFeaturesV10
public PortFeaturesV10 getSupportedFeaturesV10()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>> E$$ augmentation(Class<E$$> augmentationType)
-
setAdvertisedFeatures
public PhyPortBuilder setAdvertisedFeatures(PortFeatures value)
-
setAdvertisedFeaturesV10
public PhyPortBuilder setAdvertisedFeaturesV10(PortFeaturesV10 value)
-
setConfig
public PhyPortBuilder setConfig(PortConfig value)
-
setConfigV10
public PhyPortBuilder setConfigV10(PortConfigV10 value)
-
setCurrSpeed
public PhyPortBuilder setCurrSpeed(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setCurrSpeed
@Deprecated(forRemoval=true) public PhyPortBuilder setCurrSpeed(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setCurrSpeed(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setCurrentFeatures
public PhyPortBuilder setCurrentFeatures(PortFeatures value)
-
setCurrentFeaturesV10
public PhyPortBuilder setCurrentFeaturesV10(PortFeaturesV10 value)
-
setHwAddr
public PhyPortBuilder setHwAddr(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value)
-
setMaxSpeed
public PhyPortBuilder setMaxSpeed(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMaxSpeed
@Deprecated(forRemoval=true) public PhyPortBuilder setMaxSpeed(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMaxSpeed(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setName
public PhyPortBuilder setName(String value)
-
setPeerFeatures
public PhyPortBuilder setPeerFeatures(PortFeatures value)
-
setPeerFeaturesV10
public PhyPortBuilder setPeerFeaturesV10(PortFeaturesV10 value)
-
setPortNo
public PhyPortBuilder setPortNo(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setPortNo
@Deprecated(forRemoval=true) public PhyPortBuilder setPortNo(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setPortNo(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setState
public PhyPortBuilder setState(PortState value)
-
setStateV10
public PhyPortBuilder setStateV10(PortStateV10 value)
-
setSupportedFeatures
public PhyPortBuilder setSupportedFeatures(PortFeatures value)
-
setSupportedFeaturesV10
public PhyPortBuilder setSupportedFeaturesV10(PortFeaturesV10 value)
-
addAugmentation
public PhyPortBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort> augmentationValue)
-
removeAugmentation
public PhyPortBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PhyPort>> augmentationType)
-
build
public PhyPort build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<PhyPort>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<PhyPort,IllegalArgumentException>
-
-