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 classBuilds instances of typeImmutableProcResult. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableProcResult.Builderbuilder()Creates a builder forImmutableProcResult.static ImmutableProcResultcopyOf(ProcResult instance) Creates an immutable copy of aProcResultvalue.booleanThis instance is equal to all instances ofImmutableProcResultthat have equal attribute values.intinthashCode()Computes a hash code from attributes:exitCode,stdOutput.toString()Prints the immutable valueProcResultwith attribute values.final ImmutableProcResultwithExitCode(int value) Copy the current immutable object by setting a value for theexitCodeattribute.final ImmutableProcResultwithStdOutput(String value) Copy the current immutable object by setting a value for thestdOutputattribute.
-
Method Details
-
getExitCode
public int getExitCode()- Specified by:
getExitCodein interfaceProcResult- Returns:
- The value of the
exitCodeattribute
-
getStdOutput
- Specified by:
getStdOutputin interfaceProcResult- Returns:
- The value of the
stdOutputattribute
-
withExitCode
Copy the current immutable object by setting a value for theexitCodeattribute. 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
thisobject
-
withStdOutput
Copy the current immutable object by setting a value for thestdOutputattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableProcResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:exitCode,stdOutput. -
toString
Prints the immutable valueProcResultwith attribute values. -
copyOf
Creates an immutable copy of aProcResultvalue. 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) // requiredexitCode.stdOutput(String) // requiredstdOutput.build();- Returns:
- A new ImmutableProcResult builder
-