Class MatchV10Builder
java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder
Class that builds
MatchV10
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:
MatchV10 createMatchV10(int fooXyzzy, int barBaz) {
return new MatchV10Builder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of MatchV10, 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:
-
Constructor Summary
ConstructorDescriptionConstruct an empty builder.MatchV10Builder
(MatchV10 base) Construct a builder initialized with state from specifiedMatchV10
. -
Method Summary
Modifier and TypeMethodDescriptionaddAugmentation
(org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10> augmentation) Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10>>
E$$augmentation
(Class<E$$> augmentationType) Return the specified augmentation, if it is present in this builder.@NonNull MatchV10
build()
A newMatchV10
instance.static @NonNull MatchV10
empty()
Get empty instance of MatchV10.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
getDlDst()
Return current value associated with the property corresponding toMatchV10.getDlDst()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
getDlSrc()
Return current value associated with the property corresponding toMatchV10.getDlSrc()
.org.opendaylight.yangtools.yang.common.Uint16
Return current value associated with the property corresponding toMatchV10.getDlType()
.org.opendaylight.yangtools.yang.common.Uint16
Return current value associated with the property corresponding toMatchV10.getDlVlan()
.org.opendaylight.yangtools.yang.common.Uint8
Return current value associated with the property corresponding toMatchV10.getDlVlanPcp()
.org.opendaylight.yangtools.yang.common.Uint16
Return current value associated with the property corresponding toMatchV10.getInPort()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address
getNwDst()
Return current value associated with the property corresponding toMatchV10.getNwDst()
.org.opendaylight.yangtools.yang.common.Uint8
Return current value associated with the property corresponding toMatchV10.getNwDstMask()
.org.opendaylight.yangtools.yang.common.Uint8
Return current value associated with the property corresponding toMatchV10.getNwProto()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address
getNwSrc()
Return current value associated with the property corresponding toMatchV10.getNwSrc()
.org.opendaylight.yangtools.yang.common.Uint8
Return current value associated with the property corresponding toMatchV10.getNwSrcMask()
.org.opendaylight.yangtools.yang.common.Uint8
getNwTos()
Return current value associated with the property corresponding toMatchV10.getNwTos()
.org.opendaylight.yangtools.yang.common.Uint16
getTpDst()
Return current value associated with the property corresponding toMatchV10.getTpDst()
.org.opendaylight.yangtools.yang.common.Uint16
getTpSrc()
Return current value associated with the property corresponding toMatchV10.getTpSrc()
.Return current value associated with the property corresponding toMatchV10.getWildcards()
.removeAugmentation
(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10>> augmentationType) Remove an augmentation from this builder's product.setDlDst
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) Set the property corresponding toMatchV10.getDlDst()
to the specified value.setDlSrc
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) Set the property corresponding toMatchV10.getDlSrc()
to the specified value.setDlType
(org.opendaylight.yangtools.yang.common.Uint16 value) Set the property corresponding toMatchV10.getDlType()
to the specified value.setDlVlan
(org.opendaylight.yangtools.yang.common.Uint16 value) Set the property corresponding toMatchV10.getDlVlan()
to the specified value.setDlVlanPcp
(org.opendaylight.yangtools.yang.common.Uint8 value) Set the property corresponding toMatchV10.getDlVlanPcp()
to the specified value.setInPort
(org.opendaylight.yangtools.yang.common.Uint16 value) Set the property corresponding toMatchV10.getInPort()
to the specified value.setNwDst
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address value) Set the property corresponding toMatchV10.getNwDst()
to the specified value.setNwDstMask
(org.opendaylight.yangtools.yang.common.Uint8 value) Set the property corresponding toMatchV10.getNwDstMask()
to the specified value.setNwProto
(org.opendaylight.yangtools.yang.common.Uint8 value) Set the property corresponding toMatchV10.getNwProto()
to the specified value.setNwSrc
(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address value) Set the property corresponding toMatchV10.getNwSrc()
to the specified value.setNwSrcMask
(org.opendaylight.yangtools.yang.common.Uint8 value) Set the property corresponding toMatchV10.getNwSrcMask()
to the specified value.setNwTos
(org.opendaylight.yangtools.yang.common.Uint8 value) Set the property corresponding toMatchV10.getNwTos()
to the specified value.setTpDst
(org.opendaylight.yangtools.yang.common.Uint16 value) Set the property corresponding toMatchV10.getTpDst()
to the specified value.setTpSrc
(org.opendaylight.yangtools.yang.common.Uint16 value) Set the property corresponding toMatchV10.getTpSrc()
to the specified value.setWildcards
(FlowWildcardsV10 value) Set the property corresponding toMatchV10.getWildcards()
to the specified value.
-
Constructor Details
-
MatchV10Builder
public MatchV10Builder()Construct an empty builder. -
MatchV10Builder
Construct a builder initialized with state from specifiedMatchV10
.- Parameters:
base
- MatchV10 from which the builder should be initialized
-
-
Method Details
-
empty
Get empty instance of MatchV10.- Returns:
- An empty
MatchV10
-
getDlDst
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getDlDst()Return current value associated with the property corresponding toMatchV10.getDlDst()
.- Returns:
- current value
-
getDlSrc
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress getDlSrc()Return current value associated with the property corresponding toMatchV10.getDlSrc()
.- Returns:
- current value
-
getDlType
public org.opendaylight.yangtools.yang.common.Uint16 getDlType()Return current value associated with the property corresponding toMatchV10.getDlType()
.- Returns:
- current value
-
getDlVlan
public org.opendaylight.yangtools.yang.common.Uint16 getDlVlan()Return current value associated with the property corresponding toMatchV10.getDlVlan()
.- Returns:
- current value
-
getDlVlanPcp
public org.opendaylight.yangtools.yang.common.Uint8 getDlVlanPcp()Return current value associated with the property corresponding toMatchV10.getDlVlanPcp()
.- Returns:
- current value
-
getInPort
public org.opendaylight.yangtools.yang.common.Uint16 getInPort()Return current value associated with the property corresponding toMatchV10.getInPort()
.- Returns:
- current value
-
getNwDst
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address getNwDst()Return current value associated with the property corresponding toMatchV10.getNwDst()
.- Returns:
- current value
-
getNwDstMask
public org.opendaylight.yangtools.yang.common.Uint8 getNwDstMask()Return current value associated with the property corresponding toMatchV10.getNwDstMask()
.- Returns:
- current value
-
getNwProto
public org.opendaylight.yangtools.yang.common.Uint8 getNwProto()Return current value associated with the property corresponding toMatchV10.getNwProto()
.- Returns:
- current value
-
getNwSrc
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address getNwSrc()Return current value associated with the property corresponding toMatchV10.getNwSrc()
.- Returns:
- current value
-
getNwSrcMask
public org.opendaylight.yangtools.yang.common.Uint8 getNwSrcMask()Return current value associated with the property corresponding toMatchV10.getNwSrcMask()
.- Returns:
- current value
-
getNwTos
public org.opendaylight.yangtools.yang.common.Uint8 getNwTos()Return current value associated with the property corresponding toMatchV10.getNwTos()
.- Returns:
- current value
-
getTpDst
public org.opendaylight.yangtools.yang.common.Uint16 getTpDst()Return current value associated with the property corresponding toMatchV10.getTpDst()
.- Returns:
- current value
-
getTpSrc
public org.opendaylight.yangtools.yang.common.Uint16 getTpSrc()Return current value associated with the property corresponding toMatchV10.getTpSrc()
.- Returns:
- current value
-
getWildcards
Return current value associated with the property corresponding toMatchV10.getWildcards()
.- Returns:
- current value
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10>> 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
null
if not present - Throws:
NullPointerException
- ifaugmentType
isnull
-
setDlDst
public MatchV10Builder setDlDst(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) Set the property corresponding toMatchV10.getDlDst()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDlSrc
public MatchV10Builder setDlSrc(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress value) Set the property corresponding toMatchV10.getDlSrc()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDlType
Set the property corresponding toMatchV10.getDlType()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDlVlan
Set the property corresponding toMatchV10.getDlVlan()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDlVlanPcp
Set the property corresponding toMatchV10.getDlVlanPcp()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setInPort
Set the property corresponding toMatchV10.getInPort()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwDst
public MatchV10Builder setNwDst(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address value) Set the property corresponding toMatchV10.getNwDst()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwDstMask
Set the property corresponding toMatchV10.getNwDstMask()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwProto
Set the property corresponding toMatchV10.getNwProto()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwSrc
public MatchV10Builder setNwSrc(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address value) Set the property corresponding toMatchV10.getNwSrc()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwSrcMask
Set the property corresponding toMatchV10.getNwSrcMask()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setNwTos
Set the property corresponding toMatchV10.getNwTos()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTpDst
Set the property corresponding toMatchV10.getTpDst()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setTpSrc
Set the property corresponding toMatchV10.getTpSrc()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setWildcards
Set the property corresponding toMatchV10.getWildcards()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
addAugmentation
public MatchV10Builder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10> 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 MatchV10Builder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<MatchV10>> 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
A newMatchV10
instance.- Returns:
- A new
MatchV10
instance.
-