public static final class ImmutableProcessConfig.Builder extends Object
ImmutableProcessConfig.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableProcessConfig.Builder |
addAllCommandLine(Iterable<String> elements)
Adds elements to
commandLine list. |
ImmutableProcessConfig.Builder |
addCommandLine(String... elements)
Adds elements to
commandLine list. |
ImmutableProcessConfig.Builder |
addCommandLine(String element)
Adds one element to
commandLine list. |
ImmutableProcessConfig |
build()
Builds a new
ImmutableProcessConfig. |
ImmutableProcessConfig.Builder |
commandLine(Iterable<String> elements)
Sets or replaces all elements for
commandLine list. |
ImmutableProcessConfig.Builder |
error(StreamProcessor error)
Initializes the value for the
error attribute. |
ImmutableProcessConfig.Builder |
from(ProcessConfig instance)
Fill a builder with attribute values from the provided
ProcessConfig instance. |
ImmutableProcessConfig.Builder |
output(StreamProcessor output)
Initializes the value for the
output attribute. |
public final ImmutableProcessConfig.Builder from(ProcessConfig instance)
ProcessConfig 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 ImmutableProcessConfig.Builder addCommandLine(String element)
commandLine list.element - A commandLine elementthis builder for use in a chained invocationpublic final ImmutableProcessConfig.Builder addCommandLine(String... elements)
commandLine list.elements - An array of commandLine elementsthis builder for use in a chained invocationpublic final ImmutableProcessConfig.Builder commandLine(Iterable<String> elements)
commandLine list.elements - An iterable of commandLine elementsthis builder for use in a chained invocationpublic final ImmutableProcessConfig.Builder addAllCommandLine(Iterable<String> elements)
commandLine list.elements - An iterable of commandLine elementsthis builder for use in a chained invocationpublic final ImmutableProcessConfig.Builder output(StreamProcessor output)
output attribute.output - The value for outputthis builder for use in a chained invocationpublic final ImmutableProcessConfig.Builder error(StreamProcessor error)
error attribute.
If not set, this attribute will have a default value as returned by the initializer of error.
error - The value for errorthis builder for use in a chained invocationpublic ImmutableProcessConfig build()
ImmutableProcessConfig.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.