public final class ImmutableProcessConfig extends Object implements ProcessConfig
ProcessConfig.
Use the builder to create immutable instances:
ImmutableProcessConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableProcessConfig.Builder
Builds instances of type
ImmutableProcessConfig. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableProcessConfig.Builder |
builder()
Creates a builder for
ImmutableProcessConfig. |
List<String> |
commandLine() |
static ImmutableProcessConfig |
copyOf(ProcessConfig instance)
Creates an immutable copy of a
ProcessConfig value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableProcessConfig that have equal attribute values. |
StreamProcessor |
error() |
int |
hashCode()
Computes a hash code from attributes:
commandLine, output, error. |
StreamProcessor |
output() |
String |
toString()
Prints the immutable value
ProcessConfig with attribute values. |
ImmutableProcessConfig |
withCommandLine(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
commandLine. |
ImmutableProcessConfig |
withCommandLine(String... elements)
Copy the current immutable object with elements that replace the content of
commandLine. |
ImmutableProcessConfig |
withError(StreamProcessor value)
Copy the current immutable object by setting a value for the
error attribute. |
ImmutableProcessConfig |
withOutput(StreamProcessor value)
Copy the current immutable object by setting a value for the
output attribute. |
public List<String> commandLine()
commandLine in interface ProcessConfigcommandLine attributepublic StreamProcessor output()
output in interface ProcessConfigoutput attributepublic StreamProcessor error()
error in interface ProcessConfigerror attributepublic final ImmutableProcessConfig withCommandLine(String... elements)
commandLine.elements - The elements to setthis objectpublic final ImmutableProcessConfig withCommandLine(Iterable<String> elements)
commandLine.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of commandLine elements to setthis objectpublic final ImmutableProcessConfig withOutput(StreamProcessor value)
output attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for outputthis objectpublic final ImmutableProcessConfig withError(StreamProcessor value)
error attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for errorthis objectpublic boolean equals(Object another)
ImmutableProcessConfig that have equal attribute values.public int hashCode()
commandLine, output, error.public String toString()
ProcessConfig with attribute values.public static ImmutableProcessConfig copyOf(ProcessConfig instance)
ProcessConfig value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableProcessConfig.Builder builder()
ImmutableProcessConfig.
ImmutableProcessConfig.builder()
.addCommandLine|addAllCommandLine(String) // commandLine elements
.output(de.flapdoodle.embed.process.io.StreamProcessor) // required output
.error(de.flapdoodle.embed.process.io.StreamProcessor) // optional error
.build();
builder in interface ProcessConfigCopyright © 2022. All rights reserved.