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 ofProcResult
.Use the builder to create immutable instances:
ImmutableProcResult.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableProcResult.Builder
Builds instances of typeImmutableProcResult
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableProcResult.Builder
builder()
Creates a builder forImmutableProcResult
.static ImmutableProcResult
copyOf(ProcResult instance)
Creates an immutable copy of aProcResult
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableProcResult
that have equal attribute values.int
getExitCode()
String
getStdOutput()
int
hashCode()
Computes a hash code from attributes:exitCode
,stdOutput
.String
toString()
Prints the immutable valueProcResult
with attribute values.ImmutableProcResult
withExitCode(int value)
Copy the current immutable object by setting a value for theexitCode
attribute.ImmutableProcResult
withStdOutput(String value)
Copy the current immutable object by setting a value for thestdOutput
attribute.
-
-
-
Method Detail
-
getExitCode
public int getExitCode()
- Specified by:
getExitCode
in interfaceProcResult
- Returns:
- The value of the
exitCode
attribute
-
getStdOutput
public String getStdOutput()
- Specified by:
getStdOutput
in interfaceProcResult
- Returns:
- The value of the
stdOutput
attribute
-
withExitCode
public final ImmutableProcResult withExitCode(int value)
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
public final ImmutableProcResult withStdOutput(String value)
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
public boolean equals(@Nullable Object another)
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
public String toString()
Prints the immutable valueProcResult
with attribute values.
-
copyOf
public static ImmutableProcResult copyOf(ProcResult instance)
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
public static ImmutableProcResult.Builder builder()
Creates a builder forImmutableProcResult
.ImmutableProcResult.builder() .exitCode(int) // required
exitCode
.stdOutput(String) // requiredstdOutput
.build();- Returns:
- A new ImmutableProcResult builder
-
-