public final class ImmutableProcessOutput extends Object implements ProcessOutput
ProcessOutput.
Use the builder to create immutable instances:
ImmutableProcessOutput.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableProcessOutput.Builder
Builds instances of type
ImmutableProcessOutput. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableProcessOutput.Builder |
builder()
Creates a builder for
ImmutableProcessOutput. |
StreamProcessor |
commands() |
static ImmutableProcessOutput |
copyOf(ProcessOutput instance)
Creates an immutable copy of a
ProcessOutput value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableProcessOutput that have equal attribute values. |
StreamProcessor |
error() |
int |
hashCode()
Computes a hash code from attributes:
output, error, commands. |
StreamProcessor |
output() |
String |
toString()
Prints the immutable value
ProcessOutput with attribute values. |
ImmutableProcessOutput |
withCommands(StreamProcessor value)
Copy the current immutable object by setting a value for the
commands attribute. |
ImmutableProcessOutput |
withError(StreamProcessor value)
Copy the current immutable object by setting a value for the
error attribute. |
ImmutableProcessOutput |
withOutput(StreamProcessor value)
Copy the current immutable object by setting a value for the
output attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnamed, namedConsole, silentpublic StreamProcessor output()
output in interface ProcessOutputoutput attributepublic StreamProcessor error()
error in interface ProcessOutputerror attributepublic StreamProcessor commands()
commands in interface ProcessOutputcommands attributepublic final ImmutableProcessOutput 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 ImmutableProcessOutput 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 final ImmutableProcessOutput withCommands(StreamProcessor value)
commands attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for commandsthis objectpublic boolean equals(Object another)
ImmutableProcessOutput that have equal attribute values.public int hashCode()
output, error, commands.public String toString()
ProcessOutput with attribute values.public static ImmutableProcessOutput copyOf(ProcessOutput instance)
ProcessOutput 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 ImmutableProcessOutput.Builder builder()
ImmutableProcessOutput.
ImmutableProcessOutput.builder()
.output(de.flapdoodle.embed.process.io.StreamProcessor) // required output
.error(de.flapdoodle.embed.process.io.StreamProcessor) // required error
.commands(de.flapdoodle.embed.process.io.StreamProcessor) // required commands
.build();
builder in interface ProcessOutputCopyright © 2024. All rights reserved.