Class MatchBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.vlan.rev190416.vlan.logical.match.top.MatchBuilder
-
@Generated("mdsal-binding-generator") public class MatchBuilder extends Object
Class that buildsMatchinstances. 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:
Match createMatch(int fooXyzzy, int barBaz) { return new MatchBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }This pattern is supported by the immutable nature of Match, 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:
Match
- 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
-
-
Constructor Summary
Constructors Constructor Description MatchBuilder()Construct an empty builder.MatchBuilder(Match base)Construct a builder initialized with state from specifiedMatch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchBuilderaddAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Match> augmentation)Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Match>>
E$$augmentation(Class<E$$> augmentationType)Return the specified augmentation, if it is present in this builder.@NonNull Matchbuild()A newMatchinstance.DoubleTaggedgetDoubleTagged()Return current value associated with the property corresponding toMatch.getDoubleTagged().DoubleTaggedInnerListgetDoubleTaggedInnerList()Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerList().DoubleTaggedInnerOuterRangegetDoubleTaggedInnerOuterRange()Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerOuterRange().DoubleTaggedInnerRangegetDoubleTaggedInnerRange()Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerRange().DoubleTaggedOuterListgetDoubleTaggedOuterList()Return current value associated with the property corresponding toMatch.getDoubleTaggedOuterList().DoubleTaggedOuterRangegetDoubleTaggedOuterRange()Return current value associated with the property corresponding toMatch.getDoubleTaggedOuterRange().SingleTaggedgetSingleTagged()Return current value associated with the property corresponding toMatch.getSingleTagged().SingleTaggedListgetSingleTaggedList()Return current value associated with the property corresponding toMatch.getSingleTaggedList().SingleTaggedRangegetSingleTaggedRange()Return current value associated with the property corresponding toMatch.getSingleTaggedRange().MatchBuilderremoveAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Match>> augmentationType)Remove an augmentation from this builder's product.MatchBuildersetDoubleTagged(DoubleTagged value)Set the property corresponding toMatch.getDoubleTagged()to the specified value.MatchBuildersetDoubleTaggedInnerList(DoubleTaggedInnerList value)Set the property corresponding toMatch.getDoubleTaggedInnerList()to the specified value.MatchBuildersetDoubleTaggedInnerOuterRange(DoubleTaggedInnerOuterRange value)Set the property corresponding toMatch.getDoubleTaggedInnerOuterRange()to the specified value.MatchBuildersetDoubleTaggedInnerRange(DoubleTaggedInnerRange value)Set the property corresponding toMatch.getDoubleTaggedInnerRange()to the specified value.MatchBuildersetDoubleTaggedOuterList(DoubleTaggedOuterList value)Set the property corresponding toMatch.getDoubleTaggedOuterList()to the specified value.MatchBuildersetDoubleTaggedOuterRange(DoubleTaggedOuterRange value)Set the property corresponding toMatch.getDoubleTaggedOuterRange()to the specified value.MatchBuildersetSingleTagged(SingleTagged value)Set the property corresponding toMatch.getSingleTagged()to the specified value.MatchBuildersetSingleTaggedList(SingleTaggedList value)Set the property corresponding toMatch.getSingleTaggedList()to the specified value.MatchBuildersetSingleTaggedRange(SingleTaggedRange value)Set the property corresponding toMatch.getSingleTaggedRange()to the specified value.
-
-
-
Method Detail
-
getDoubleTagged
public DoubleTagged getDoubleTagged()
Return current value associated with the property corresponding toMatch.getDoubleTagged().- Returns:
- current value
-
getDoubleTaggedInnerList
public DoubleTaggedInnerList getDoubleTaggedInnerList()
Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerList().- Returns:
- current value
-
getDoubleTaggedInnerOuterRange
public DoubleTaggedInnerOuterRange getDoubleTaggedInnerOuterRange()
Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerOuterRange().- Returns:
- current value
-
getDoubleTaggedInnerRange
public DoubleTaggedInnerRange getDoubleTaggedInnerRange()
Return current value associated with the property corresponding toMatch.getDoubleTaggedInnerRange().- Returns:
- current value
-
getDoubleTaggedOuterList
public DoubleTaggedOuterList getDoubleTaggedOuterList()
Return current value associated with the property corresponding toMatch.getDoubleTaggedOuterList().- Returns:
- current value
-
getDoubleTaggedOuterRange
public DoubleTaggedOuterRange getDoubleTaggedOuterRange()
Return current value associated with the property corresponding toMatch.getDoubleTaggedOuterRange().- Returns:
- current value
-
getSingleTagged
public SingleTagged getSingleTagged()
Return current value associated with the property corresponding toMatch.getSingleTagged().- Returns:
- current value
-
getSingleTaggedList
public SingleTaggedList getSingleTaggedList()
Return current value associated with the property corresponding toMatch.getSingleTaggedList().- Returns:
- current value
-
getSingleTaggedRange
public SingleTaggedRange getSingleTaggedRange()
Return current value associated with the property corresponding toMatch.getSingleTaggedRange().- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Match>> E$$ augmentation(Class<E$$> augmentationType)
Return the specified augmentation, if it is present in this builder.- Type Parameters:
E$$- augmentation type- Parameters:
augmentationType- augmentation type class- Returns:
- Augmentation object from this builder, or
nullif not present - Throws:
NullPointerException- ifaugmentTypeisnull
-
setDoubleTagged
public MatchBuilder setDoubleTagged(DoubleTagged value)
Set the property corresponding toMatch.getDoubleTagged()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setDoubleTaggedInnerList
public MatchBuilder setDoubleTaggedInnerList(DoubleTaggedInnerList value)
Set the property corresponding toMatch.getDoubleTaggedInnerList()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setDoubleTaggedInnerOuterRange
public MatchBuilder setDoubleTaggedInnerOuterRange(DoubleTaggedInnerOuterRange value)
Set the property corresponding toMatch.getDoubleTaggedInnerOuterRange()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setDoubleTaggedInnerRange
public MatchBuilder setDoubleTaggedInnerRange(DoubleTaggedInnerRange value)
Set the property corresponding toMatch.getDoubleTaggedInnerRange()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setDoubleTaggedOuterList
public MatchBuilder setDoubleTaggedOuterList(DoubleTaggedOuterList value)
Set the property corresponding toMatch.getDoubleTaggedOuterList()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setDoubleTaggedOuterRange
public MatchBuilder setDoubleTaggedOuterRange(DoubleTaggedOuterRange value)
Set the property corresponding toMatch.getDoubleTaggedOuterRange()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setSingleTagged
public MatchBuilder setSingleTagged(SingleTagged value)
Set the property corresponding toMatch.getSingleTagged()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setSingleTaggedList
public MatchBuilder setSingleTaggedList(SingleTaggedList value)
Set the property corresponding toMatch.getSingleTaggedList()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
setSingleTaggedRange
public MatchBuilder setSingleTaggedRange(SingleTaggedRange value)
Set the property corresponding toMatch.getSingleTaggedRange()to the specified value.- Parameters:
value- desired value- Returns:
- this builder
-
addAugmentation
public MatchBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Match> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException- ifaugmentationis null
-
removeAugmentation
public MatchBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Match>> 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
-
-