public static final class ImmutablePropertyRelation.Builder extends Object
ImmutablePropertyRelation.
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
ImmutablePropertyRelation instances. |
| Modifier and Type | Method and Description |
|---|---|
ImmutablePropertyRelation.Builder |
action(String action)
Initializes the value for the
action attribute. |
ImmutablePropertyRelation.Builder |
addAllWhen(Iterable<? extends ComponentDefinition.When> elements)
Adds elements to
when list. |
ImmutablePropertyRelation.Builder |
addWhen(ComponentDefinition.When... elements)
Adds elements to
when list. |
ImmutablePropertyRelation.Builder |
addWhen(ComponentDefinition.When element)
Adds one element to
when list. |
ImmutablePropertyRelation |
build()
Builds a new
ImmutablePropertyRelation. |
ImmutablePropertyRelation.Builder |
from(ComponentDefinition.PropertyRelation instance)
Fill a builder with attribute values from the provided
PropertyRelation instance. |
ImmutablePropertyRelation.Builder |
when(Iterable<? extends ComponentDefinition.When> elements)
Sets or replaces all elements for
when list. |
public Builder()
ImmutablePropertyRelation instances.
new ImmutablePropertyRelation.Builder()
.action(String) // required action
.addWhen|addAllWhen(io.syndesis.integration.component.proxy.ComponentDefinition.When) // when elements
.build();
public final ImmutablePropertyRelation.Builder from(ComponentDefinition.PropertyRelation instance)
PropertyRelation instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutablePropertyRelation.Builder action(String action)
action attribute.action - The value for actionthis builder for use in a chained invocationpublic final ImmutablePropertyRelation.Builder addWhen(ComponentDefinition.When element)
when list.element - A when elementthis builder for use in a chained invocationpublic final ImmutablePropertyRelation.Builder addWhen(ComponentDefinition.When... elements)
when list.elements - An array of when elementsthis builder for use in a chained invocationpublic final ImmutablePropertyRelation.Builder when(Iterable<? extends ComponentDefinition.When> elements)
when list.elements - An iterable of when elementsthis builder for use in a chained invocationpublic final ImmutablePropertyRelation.Builder addAllWhen(Iterable<? extends ComponentDefinition.When> elements)
when list.elements - An iterable of when elementsthis builder for use in a chained invocationpublic ImmutablePropertyRelation build()
ImmutablePropertyRelation.IllegalStateException - if any required attributes are missingCopyright © 2016–2019 Red Hat. All rights reserved.