public class SessionBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Session>
SessionBuilder 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:
SessionBuilder createTarget(int fooXyzzy, int barBaz) {
return new SessionBuilderBuilder()
.setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
.setBar(new BarBuilder().setBaz(barBaz).build())
.build();
}
This pattern is supported by the immutable nature of SessionBuilder, 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 methodSessionBuilder,
Builder| Constructor and Description |
|---|
SessionBuilder() |
SessionBuilder(OpenObject arg) |
SessionBuilder(Session base) |
| Modifier and Type | Method and Description |
|---|---|
SessionBuilder |
addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> augmentationType,
org.opendaylight.yangtools.yang.binding.Augmentation<Session> augmentationValue) |
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> |
augmentation(Class<E$$> augmentationType) |
Session |
build() |
void |
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.
|
Open |
getOpen() |
SessionBuilder |
removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> augmentationType) |
SessionBuilder |
setOpen(Open value) |
public SessionBuilder()
public SessionBuilder(OpenObject arg)
public SessionBuilder(Session base)
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
arg - grouping objectIllegalArgumentException - if given argument is none of valid typespublic Open getOpen()
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> E$$ augmentation(Class<E$$> augmentationType)
public SessionBuilder setOpen(Open value)
public SessionBuilder addAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Session> augmentationValue)
public SessionBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Session>> augmentationType)
public Session build()
build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<Session,IllegalArgumentException>Copyright © 2020 OpenDaylight. All rights reserved.