public class InterfaceBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Interface>
InterfaceBuilder
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:
InterfaceBuilder createTarget(int fooXyzzy, int barBaz) {
return new InterfaceBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of InterfaceBuilder, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
build()
, which is then returned from the methodInterfaceBuilder
,
Builder
Constructor and Description |
---|
InterfaceBuilder() |
InterfaceBuilder(Interface base) |
Modifier and Type | Method and Description |
---|---|
InterfaceBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Interface> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> |
augmentation(Class<E$$> augmentationType) |
Interface |
build() |
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress |
getInterfaceIp() |
String |
getInterfaceName() |
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress |
getMacAddress() |
InterfaceBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> augmentationType) |
InterfaceBuilder |
setInterfaceIp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress value) |
InterfaceBuilder |
setInterfaceName(String value) |
InterfaceBuilder |
setMacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress value) |
public InterfaceBuilder()
public InterfaceBuilder(Interface base)
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getInterfaceIp()
public String getInterfaceName()
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress getMacAddress()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> E$$ augmentation(Class<E$$> augmentationType)
public InterfaceBuilder setInterfaceIp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress value)
public InterfaceBuilder setInterfaceName(String value)
public InterfaceBuilder setMacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress value)
public InterfaceBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Interface> augmentationValue)
public InterfaceBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Interface>> augmentationType)
public Interface build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Interface,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.