public static final class ImmutableComponentDefinition.Builder extends Object
ImmutableComponentDefinition.
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
ImmutableComponentDefinition instances. |
public Builder()
ImmutableComponentDefinition instances.
new ImmutableComponentDefinition.Builder()
.component(io.syndesis.integration.component.proxy.ComponentDefinition.Component) // required component
.putComponentProperties|putAllComponentProperties(String => io.syndesis.integration.component.proxy.ComponentDefinition.Property) // componentProperties mappings
.putEndpointProperties|putAllEndpointProperties(String => io.syndesis.integration.component.proxy.ComponentDefinition.Property) // endpointProperties mappings
.build();
public final ImmutableComponentDefinition.Builder from(ComponentDefinition instance)
ComponentDefinition 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 ImmutableComponentDefinition.Builder component(ComponentDefinition.Component component)
component attribute.component - The value for componentthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putComponentProperties(String key, ComponentDefinition.Property value)
componentProperties map.key - The key in the componentProperties mapvalue - The associated value in the componentProperties mapthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putComponentProperties(Map.Entry<String,? extends ComponentDefinition.Property> entry)
componentProperties map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder componentProperties(Map<String,? extends ComponentDefinition.Property> entries)
componentProperties map. Nulls are not permittedentries - The entries that will be added to the componentProperties mapthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putAllComponentProperties(Map<String,? extends ComponentDefinition.Property> entries)
componentProperties map. Nulls are not permittedentries - The entries that will be added to the componentProperties mapthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putEndpointProperties(String key, ComponentDefinition.Property value)
endpointProperties map.key - The key in the endpointProperties mapvalue - The associated value in the endpointProperties mapthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putEndpointProperties(Map.Entry<String,? extends ComponentDefinition.Property> entry)
endpointProperties map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder endpointProperties(Map<String,? extends ComponentDefinition.Property> entries)
endpointProperties map. Nulls are not permittedentries - The entries that will be added to the endpointProperties mapthis builder for use in a chained invocationpublic final ImmutableComponentDefinition.Builder putAllEndpointProperties(Map<String,? extends ComponentDefinition.Property> entries)
endpointProperties map. Nulls are not permittedentries - The entries that will be added to the endpointProperties mapthis builder for use in a chained invocationpublic ImmutableComponentDefinition build()
ImmutableComponentDefinition.IllegalStateException - if any required attributes are missingCopyright © 2016–2019 Red Hat. All rights reserved.