Package tech.catheu.jnotebook
Record Class ExecutionStatus
java.lang.Object
java.lang.Record
tech.catheu.jnotebook.ExecutionStatus
public record ExecutionStatus(@NonNull ExecutionStatus.Status status, @Nullable String failureMessage, @Nullable Exception failureException)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExecutionStatus(@NonNull ExecutionStatus.Status status, @Nullable String failureMessage, @Nullable Exception failureException) Creates an instance of aExecutionStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ExecutionStatus@Nullable ExceptionReturns the value of thefailureExceptionrecord component.@Nullable StringReturns the value of thefailureMessagerecord component.final inthashCode()Returns a hash code value for this object.booleanisOk()static ExecutionStatusok()@NonNull ExecutionStatus.Statusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExecutionStatus
public ExecutionStatus(@NonNull ExecutionStatus.Status status, @Nullable String failureMessage, @Nullable Exception failureException) Creates an instance of aExecutionStatusrecord class.- Parameters:
status- the value for thestatusrecord componentfailureMessage- the value for thefailureMessagerecord componentfailureException- the value for thefailureExceptionrecord component
-
-
Method Details
-
isOk
public boolean isOk() -
ok
-
failure
public static ExecutionStatus failure(@NonNull String failureMessage, @Nullable Exception failureException) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
failureMessage
Returns the value of thefailureMessagerecord component.- Returns:
- the value of the
failureMessagerecord component
-
failureException
Returns the value of thefailureExceptionrecord component.- Returns:
- the value of the
failureExceptionrecord component
-