public class LockBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Lock>
LockBuilder
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:
LockBuilder createTarget(int fooXyzzy, int barBaz) {
return new LockBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of LockBuilder, 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 methodLockBuilder
,
Builder
Constructor and Description |
---|
LockBuilder() |
LockBuilder(Lock base) |
Modifier and Type | Method and Description |
---|---|
LockBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Lock> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> |
augmentation(Class<E$$> augmentationType) |
Lock |
build() |
String |
getLockName() |
String |
getLockOwner() |
LockKey |
key() |
LockBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> augmentationType) |
LockBuilder |
setLockName(String value) |
LockBuilder |
setLockOwner(String value) |
LockBuilder |
withKey(LockKey key) |
public LockBuilder()
public LockBuilder(Lock base)
public LockKey key()
public String getLockName()
public String getLockOwner()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> E$$ augmentation(Class<E$$> augmentationType)
public LockBuilder withKey(LockKey key)
public LockBuilder setLockName(String value)
public LockBuilder setLockOwner(String value)
public LockBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Lock> augmentationValue)
public LockBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Lock>> augmentationType)
public Lock build()
build
in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Lock,IllegalArgumentException>
Copyright © 2019 OpenDaylight. All rights reserved.