Record Class MetaCommandHandler.CommandResult
java.lang.Object
java.lang.Record
org.ek9lang.cli.MetaCommandHandler.CommandResult
- Enclosing class:
MetaCommandHandler
public static record MetaCommandHandler.CommandResult(ReplSession.InputResult result, String message)
extends Record
Result of command handling, including any message to display.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandResult(ReplSession.InputResult result, String message) Creates an instance of aCommandResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.of(ReplSession.InputResult result) result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.withMessage(ReplSession.InputResult result, String message)
-
Constructor Details
-
CommandResult
Creates an instance of aCommandResultrecord class.- Parameters:
result- the value for theresultrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
of
-
withMessage
public static MetaCommandHandler.CommandResult withMessage(ReplSession.InputResult result, String message) -
error
-
toString
-
hashCode
-
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). -
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-