Class ImmutableProcResult
java.lang.Object
io.jenkins.plugins.projectenv.proc.ImmutableProcResult
- All Implemented Interfaces:
ProcResult
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableProcResult
extends Object
implements ProcResult
Immutable implementation of
ProcResult
.
Use the builder to create immutable instances:
ImmutableProcResult.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableProcResult
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableProcResult.Builder
builder()
Creates a builder forImmutableProcResult
.static ImmutableProcResult
copyOf
(ProcResult instance) Creates an immutable copy of aProcResult
value.boolean
This instance is equal to all instances ofImmutableProcResult
that have equal attribute values.int
int
hashCode()
Computes a hash code from attributes:exitCode
,stdOutput
.toString()
Prints the immutable valueProcResult
with attribute values.final ImmutableProcResult
withExitCode
(int value) Copy the current immutable object by setting a value for theexitCode
attribute.final ImmutableProcResult
withStdOutput
(String value) Copy the current immutable object by setting a value for thestdOutput
attribute.
-
Method Details
-
getExitCode
public int getExitCode()- Specified by:
getExitCode
in interfaceProcResult
- Returns:
- The value of the
exitCode
attribute
-
getStdOutput
- Specified by:
getStdOutput
in interfaceProcResult
- Returns:
- The value of the
stdOutput
attribute
-
withExitCode
Copy the current immutable object by setting a value for theexitCode
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for exitCode- Returns:
- A modified copy of the
this
object
-
withStdOutput
Copy the current immutable object by setting a value for thestdOutput
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for stdOutput- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableProcResult
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:exitCode
,stdOutput
. -
toString
Prints the immutable valueProcResult
with attribute values. -
copyOf
Creates an immutable copy of aProcResult
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable ProcResult instance
-
builder
Creates a builder forImmutableProcResult
.ImmutableProcResult.builder() .exitCode(int) // required
exitCode
.stdOutput(String) // requiredstdOutput
.build();- Returns:
- A new ImmutableProcResult builder
-