public static final class ImmutableWhen.Builder extends Object
ImmutableWhen.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Constructor and Description |
|---|
Builder()
Creates a builder for
ImmutableWhen instances. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableWhen |
build()
Builds a new
ImmutableWhen. |
ImmutableWhen.Builder |
from(ComponentDefinition.When instance)
Fill a builder with attribute values from the provided
When instance. |
ImmutableWhen.Builder |
id(String id)
Initializes the value for the
id attribute. |
ImmutableWhen.Builder |
value(String value)
Initializes the value for the
value attribute. |
public Builder()
ImmutableWhen instances.
new ImmutableWhen.Builder()
.id(String) // required id
.value(String) // required value
.build();
public final ImmutableWhen.Builder from(ComponentDefinition.When instance)
When instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableWhen.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final ImmutableWhen.Builder value(String value)
value attribute.value - The value for valuethis builder for use in a chained invocationpublic ImmutableWhen build()
ImmutableWhen.IllegalStateException - if any required attributes are missingCopyright © 2016–2019 Red Hat. All rights reserved.