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>
public class BgpConditionsBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<BgpConditions>
Class that buildsBgpConditionsBuilder
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:
BgpConditionsBuilder createTarget(int fooXyzzy, int barBaz) { return new BgpConditionsBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of BgpConditionsBuilder, 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:
BgpConditionsBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description BgpConditionsBuilder()
BgpConditionsBuilder(BgpAttributeConditions arg)
BgpConditionsBuilder(BgpMatchConditions arg)
BgpConditionsBuilder(BgpConditions base)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BgpConditionsBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions> augmentationValue)
<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)
BgpConditionsBuilder
setAfiSafiIn(List<Class<? extends AfiSafiType>> values)
BgpConditionsBuilder
setAsPathLength(AsPathLength value)
BgpConditionsBuilder
setCommunityCount(CommunityCount value)
BgpConditionsBuilder
setLocalPrefEq(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setLocalPrefEq(Uint32)} instead.BgpConditionsBuilder
setLocalPrefEq(org.opendaylight.yangtools.yang.common.Uint32 value)
BgpConditionsBuilder
setMatchAsPathSet(MatchAsPathSet value)
BgpConditionsBuilder
setMatchCommunitySet(MatchCommunitySet value)
BgpConditionsBuilder
setMatchExtCommunitySet(MatchExtCommunitySet value)
BgpConditionsBuilder
setMedEq(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMedEq(Uint32)} instead.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:- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.BgpMatchConditions
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.policy.rev151009.BgpAttributeConditions
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
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)
-
setLocalPrefEq
@Deprecated(forRemoval=true) public BgpConditionsBuilder setLocalPrefEq(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setLocalPrefEq(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
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)
-
setMedEq
@Deprecated(forRemoval=true) public BgpConditionsBuilder setMedEq(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMedEq(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
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(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions> augmentationValue)
-
removeAugmentation
public BgpConditionsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<BgpConditions>> augmentationType)
-
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>
-
-