Package com.powsybl.computation.slurm
Record Class CommandResult
java.lang.Object
java.lang.Record
com.powsybl.computation.slurm.CommandResult
The results of the execution of a shell command:
the exit code, and standard output and standard error as strings.
- Author:
- Sylvain Leclerc <sylvain.leclerc at rte-france.com>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandResult
(int exitCode, String stdOut, String stdErr) Creates an instance of aCommandResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
exitCode()
Returns the value of theexitCode
record component.final int
hashCode()
Returns a hash code value for this object.stdErr()
Returns the value of thestdErr
record component.stdOut()
Returns the value of thestdOut
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CommandResult
Creates an instance of aCommandResult
record class.- Parameters:
exitCode
- the value for theexitCode
record componentstdOut
- the value for thestdOut
record componentstdErr
- the value for thestdErr
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
exitCode
public int exitCode()Returns the value of theexitCode
record component.- Returns:
- the value of the
exitCode
record component
-
stdOut
Returns the value of thestdOut
record component.- Returns:
- the value of the
stdOut
record component
-
stdErr
Returns the value of thestdErr
record component.- Returns:
- the value of the
stdErr
record component
-