Class LogicalRoutersBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalRoutersBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<LogicalRouters>
,org.opendaylight.yangtools.concepts.CheckedBuilder<LogicalRouters,IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class LogicalRoutersBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<LogicalRouters>
Class that buildsLogicalRoutersBuilder
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:
LogicalRoutersBuilder createTarget(int fooXyzzy, int barBaz) { return new LogicalRoutersBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of LogicalRoutersBuilder, 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:
LogicalRoutersBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description LogicalRoutersBuilder()
LogicalRoutersBuilder(LogicalRouters base)
LogicalRoutersBuilder(HwvtepLogicalRouterAttributes arg)
LogicalRoutersBuilder(HwvtepNodeIdentification arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogicalRoutersBuilder
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>>
E$$augmentation(Class<E$$> augmentationType)
LogicalRouters
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.List<AclBindings>
getAclBindings()
String
getHwvtepNodeDescription()
HwvtepNodeName
getHwvtepNodeName()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getLogicalRouterUuid()
List<StaticRoutes>
getStaticRoutes()
List<SwitchBindings>
getSwitchBindings()
LogicalRoutersKey
key()
LogicalRoutersBuilder
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>> augmentationType)
LogicalRoutersBuilder
setAclBindings(List<AclBindings> values)
LogicalRoutersBuilder
setHwvtepNodeDescription(String value)
LogicalRoutersBuilder
setHwvtepNodeName(HwvtepNodeName value)
LogicalRoutersBuilder
setLogicalRouterUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
LogicalRoutersBuilder
setStaticRoutes(List<StaticRoutes> values)
LogicalRoutersBuilder
setSwitchBindings(List<SwitchBindings> values)
LogicalRoutersBuilder
withKey(LogicalRoutersKey key)
-
-
-
Constructor Detail
-
LogicalRoutersBuilder
public LogicalRoutersBuilder()
-
LogicalRoutersBuilder
public LogicalRoutersBuilder(HwvtepLogicalRouterAttributes arg)
-
LogicalRoutersBuilder
public LogicalRoutersBuilder(HwvtepNodeIdentification arg)
-
LogicalRoutersBuilder
public LogicalRoutersBuilder(LogicalRouters 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.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepNodeIdentification
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepLogicalRouterAttributes
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
key
public LogicalRoutersKey key()
-
getAclBindings
public List<AclBindings> getAclBindings()
-
getHwvtepNodeDescription
public String getHwvtepNodeDescription()
-
getHwvtepNodeName
public HwvtepNodeName getHwvtepNodeName()
-
getLogicalRouterUuid
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getLogicalRouterUuid()
-
getStaticRoutes
public List<StaticRoutes> getStaticRoutes()
-
getSwitchBindings
public List<SwitchBindings> getSwitchBindings()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>> E$$ augmentation(Class<E$$> augmentationType)
-
withKey
public LogicalRoutersBuilder withKey(LogicalRoutersKey key)
-
setAclBindings
public LogicalRoutersBuilder setAclBindings(List<AclBindings> values)
-
setHwvtepNodeDescription
public LogicalRoutersBuilder setHwvtepNodeDescription(String value)
-
setHwvtepNodeName
public LogicalRoutersBuilder setHwvtepNodeName(HwvtepNodeName value)
-
setLogicalRouterUuid
public LogicalRoutersBuilder setLogicalRouterUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setStaticRoutes
public LogicalRoutersBuilder setStaticRoutes(List<StaticRoutes> values)
-
setSwitchBindings
public LogicalRoutersBuilder setSwitchBindings(List<SwitchBindings> values)
-
addAugmentation
public LogicalRoutersBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters> augmentationValue)
-
removeAugmentation
public LogicalRoutersBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<LogicalRouters>> augmentationType)
-
build
public LogicalRouters build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<LogicalRouters>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<LogicalRouters,IllegalArgumentException>
-
-