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 aCommandExceptionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionrecord component.inthashCode()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, waitMethods inherited from interface kboyle.oktane.core.results.command.CommandResult
monoMethods inherited from interface kboyle.oktane.core.results.FailedResult
success
-
Constructor Details
-
CommandExceptionResult
Creates an instance of aCommandExceptionResultrecord class.- Parameters:
command- the value for thecommandrecord componentexception- the value for theexceptionrecord component
-
-
Method Details
-
reason
- Specified by:
reasonin 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 thecommandrecord component.- Specified by:
commandin interfaceCommandResult- Returns:
- the value of the
commandrecord component
-
exception
Returns the value of theexceptionrecord component.- Specified by:
exceptionin interfaceExceptionResult- Returns:
- the value of the
exceptionrecord component
-