Class BgpConditionsBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.routing.policy.policy.definitions.policy.definition.statements.statement.conditions.BgpConditionsBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<BgpConditions>
,org.opendaylight.yangtools.concepts.CheckedBuilder<BgpConditions,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class BgpConditionsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<BgpConditions>
Class that buildsBgpConditions
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:
BgpConditions createBgpConditions(int fooXyzzy, int barBaz) { return new BgpConditionsBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of BgpConditions, 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 opportunities, 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:
BgpConditions
,Builder
-
-
Constructor Summary
Constructors Constructor Description BgpConditionsBuilder()
BgpConditionsBuilder(BgpAttributeConditions arg)
BgpConditionsBuilder(BgpMatchConditions arg)
BgpConditionsBuilder(BgpConditions base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BgpConditionsBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>>
E$$augmentation(Class<E$$> augmentationType)
BgpConditions
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.List<Class<? extends AfiSafiType>>
getAfiSafiIn()
AsPathLength
getAsPathLength()
CommunityCount
getCommunityCount()
org.opendaylight.yangtools.yang.common.Uint32
getLocalPrefEq()
MatchAsPathSet
getMatchAsPathSet()
MatchCommunitySet
getMatchCommunitySet()
MatchExtCommunitySet
getMatchExtCommunitySet()
org.opendaylight.yangtools.yang.common.Uint32
getMedEq()
List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress>
getNextHopIn()
BgpOriginAttrType
getOriginEq()
BgpAttributeConditions.RouteType
getRouteType()
BgpConditionsBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> augmentationType)
Remove an augmentation from this builder's product.BgpConditionsBuilder
setAfiSafiIn(List<Class<? extends AfiSafiType>> values)
BgpConditionsBuilder
setAsPathLength(AsPathLength value)
BgpConditionsBuilder
setCommunityCount(CommunityCount value)
BgpConditionsBuilder
setLocalPrefEq(org.opendaylight.yangtools.yang.common.Uint32 value)
BgpConditionsBuilder
setMatchAsPathSet(MatchAsPathSet value)
BgpConditionsBuilder
setMatchCommunitySet(MatchCommunitySet value)
BgpConditionsBuilder
setMatchExtCommunitySet(MatchExtCommunitySet value)
BgpConditionsBuilder
setMedEq(org.opendaylight.yangtools.yang.common.Uint32 value)
BgpConditionsBuilder
setNextHopIn(List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> values)
BgpConditionsBuilder
setOriginEq(BgpOriginAttrType value)
BgpConditionsBuilder
setRouteType(BgpAttributeConditions.RouteType value)
-
-
-
Constructor Detail
-
BgpConditionsBuilder
public BgpConditionsBuilder()
-
BgpConditionsBuilder
public BgpConditionsBuilder(BgpMatchConditions arg)
-
BgpConditionsBuilder
public BgpConditionsBuilder(BgpAttributeConditions arg)
-
BgpConditionsBuilder
public BgpConditionsBuilder(BgpConditions 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:- BgpMatchConditions
- BgpAttributeConditions
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getAfiSafiIn
public List<Class<? extends AfiSafiType>> getAfiSafiIn()
-
getAsPathLength
public AsPathLength getAsPathLength()
-
getCommunityCount
public CommunityCount getCommunityCount()
-
getLocalPrefEq
public org.opendaylight.yangtools.yang.common.Uint32 getLocalPrefEq()
-
getMatchAsPathSet
public MatchAsPathSet getMatchAsPathSet()
-
getMatchCommunitySet
public MatchCommunitySet getMatchCommunitySet()
-
getMatchExtCommunitySet
public MatchExtCommunitySet getMatchExtCommunitySet()
-
getMedEq
public org.opendaylight.yangtools.yang.common.Uint32 getMedEq()
-
getNextHopIn
public List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> getNextHopIn()
-
getOriginEq
public BgpOriginAttrType getOriginEq()
-
getRouteType
public BgpAttributeConditions.RouteType getRouteType()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> E$$ augmentation(Class<E$$> augmentationType)
-
setAfiSafiIn
public BgpConditionsBuilder setAfiSafiIn(List<Class<? extends AfiSafiType>> values)
-
setAsPathLength
public BgpConditionsBuilder setAsPathLength(AsPathLength value)
-
setCommunityCount
public BgpConditionsBuilder setCommunityCount(CommunityCount value)
-
setLocalPrefEq
public BgpConditionsBuilder setLocalPrefEq(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMatchAsPathSet
public BgpConditionsBuilder setMatchAsPathSet(MatchAsPathSet value)
-
setMatchCommunitySet
public BgpConditionsBuilder setMatchCommunitySet(MatchCommunitySet value)
-
setMatchExtCommunitySet
public BgpConditionsBuilder setMatchExtCommunitySet(MatchExtCommunitySet value)
-
setMedEq
public BgpConditionsBuilder setMedEq(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setNextHopIn
public BgpConditionsBuilder setNextHopIn(List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> values)
-
setOriginEq
public BgpConditionsBuilder setOriginEq(BgpOriginAttrType value)
-
setRouteType
public BgpConditionsBuilder setRouteType(BgpAttributeConditions.RouteType value)
-
addAugmentation
public BgpConditionsBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public BgpConditionsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> 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
-
build
public BgpConditions build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<BgpConditions>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<BgpConditions,IllegalArgumentException>
-
-