Record Class CommandExceptionResult
java.lang.Object
java.lang.Record
kboyle.oktane.core.results.command.CommandExceptionResult
- All Implemented Interfaces:
CommandResult
,ExceptionResult
,FailedResult
,Result
public record CommandExceptionResult(Command command, Exception exception)
extends Record
implements ExceptionResult, CommandResult
-
Constructor Summary
ConstructorsConstructorDescriptionCommandExceptionResult(Command command, Exception exception)
Creates an instance of aCommandExceptionResult
record class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()
Returns the value of thecommand
record component.boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexception
record component.int
hashCode()
Returns a hash code value for this object.reason()
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface kboyle.oktane.core.results.command.CommandResult
mono
Methods inherited from interface kboyle.oktane.core.results.FailedResult
success
-
Constructor Details
-
CommandExceptionResult
Creates an instance of aCommandExceptionResult
record class.- Parameters:
command
- the value for thecommand
record componentexception
- the value for theexception
record component
-
-
Method Details
-
reason
- Specified by:
reason
in interfaceFailedResult
-
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)
. -
command
Returns the value of thecommand
record component.- Specified by:
command
in interfaceCommandResult
- Returns:
- the value of the
command
record component
-
exception
Returns the value of theexception
record component.- Specified by:
exception
in interfaceExceptionResult
- Returns:
- the value of the
exception
record component
-