Package org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.prefix.to._interface.vpn.ids
Class PrefixesBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.prefix.to._interface.vpn.ids.PrefixesBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Prefixes>
,org.opendaylight.yangtools.concepts.CheckedBuilder<Prefixes,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class PrefixesBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<Prefixes>
Class that buildsPrefixesBuilder
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:
PrefixesBuilder createTarget(int fooXyzzy, int barBaz) { return new PrefixesBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of PrefixesBuilder, 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:
PrefixesBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description PrefixesBuilder()
PrefixesBuilder(Prefixes base)
PrefixesBuilder(NetworkAttributes arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PrefixesBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
Prefixes
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.org.opendaylight.yangtools.yang.common.Uint64
getDpnId()
java.lang.Boolean
getExternal()
java.lang.String
getIpAddress()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getNetworkId()
NetworkAttributes.NetworkType
getNetworkType()
Prefixes.PrefixCue
getPrefixCue()
org.opendaylight.yangtools.yang.common.Uint32
getSegmentationId()
java.lang.String
getVpnInterfaceName()
java.lang.Boolean
isExternal()
Deprecated, for removal: This API element is subject to removal in a future version.PrefixesKey
key()
PrefixesBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes>> augmentationType)
Remove an augmentation from this builder's product.PrefixesBuilder
setDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDpnId(Uint64)
instead.PrefixesBuilder
setDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
PrefixesBuilder
setExternal(java.lang.Boolean value)
PrefixesBuilder
setIpAddress(java.lang.String value)
PrefixesBuilder
setNetworkId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
PrefixesBuilder
setNetworkType(NetworkAttributes.NetworkType value)
PrefixesBuilder
setPrefixCue(Prefixes.PrefixCue value)
PrefixesBuilder
setSegmentationId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSegmentationId(Uint32)
instead.PrefixesBuilder
setSegmentationId(org.opendaylight.yangtools.yang.common.Uint32 value)
PrefixesBuilder
setVpnInterfaceName(java.lang.String value)
PrefixesBuilder
withKey(PrefixesKey key)
-
-
-
Constructor Detail
-
PrefixesBuilder
public PrefixesBuilder()
-
PrefixesBuilder
public PrefixesBuilder(NetworkAttributes arg)
-
PrefixesBuilder
public PrefixesBuilder(Prefixes 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.netvirt.neutronvpn.rev150602.NetworkAttributes
- Parameters:
arg
- grouping object- Throws:
java.lang.IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
key
public PrefixesKey key()
-
getDpnId
public org.opendaylight.yangtools.yang.common.Uint64 getDpnId()
-
getExternal
public java.lang.Boolean getExternal()
-
isExternal
@Deprecated(forRemoval=true) public final java.lang.Boolean isExternal()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getIpAddress
public java.lang.String getIpAddress()
-
getNetworkId
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getNetworkId()
-
getNetworkType
public NetworkAttributes.NetworkType getNetworkType()
-
getPrefixCue
public Prefixes.PrefixCue getPrefixCue()
-
getSegmentationId
public org.opendaylight.yangtools.yang.common.Uint32 getSegmentationId()
-
getVpnInterfaceName
public java.lang.String getVpnInterfaceName()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public PrefixesBuilder withKey(PrefixesKey key)
-
setDpnId
public PrefixesBuilder setDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setDpnId
@Deprecated(forRemoval=true) public PrefixesBuilder setDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetDpnId(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setExternal
public PrefixesBuilder setExternal(java.lang.Boolean value)
-
setIpAddress
public PrefixesBuilder setIpAddress(java.lang.String value)
-
setNetworkId
public PrefixesBuilder setNetworkId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setNetworkType
public PrefixesBuilder setNetworkType(NetworkAttributes.NetworkType value)
-
setPrefixCue
public PrefixesBuilder setPrefixCue(Prefixes.PrefixCue value)
-
setSegmentationId
public PrefixesBuilder setSegmentationId(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setSegmentationId
@Deprecated(forRemoval=true) public PrefixesBuilder setSegmentationId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSegmentationId(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setVpnInterfaceName
public PrefixesBuilder setVpnInterfaceName(java.lang.String value)
-
addAugmentation
public PrefixesBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
java.lang.NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public PrefixesBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Prefixes>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType
- augmentation type to be removed- Returns:
- this builder
-
-