Record Class CommandMessageResult
java.lang.Object
java.lang.Record
kboyle.oktane.core.results.command.CommandMessageResult
- All Implemented Interfaces:
CommandResult,Result,SuccessfulResult
public record CommandMessageResult(Command command, String message)
extends Record
implements CommandResult, SuccessfulResult
-
Constructor Summary
ConstructorsConstructorDescriptionCommandMessageResult(Command command, String message)Creates an instance of aCommandMessageResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.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.SuccessfulResult
success
-
Constructor Details
-
CommandMessageResult
Creates an instance of aCommandMessageResultrecord class.- Parameters:
command- the value for thecommandrecord componentmessage- the value for themessagerecord 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. 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
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-