getCommandResult

abstract fun <R> getCommandResult(key: String): R?

Retrieves a previously stored command result by its key.

Return

The stored result cast to type R, or null if no result exists for the key

Parameters

R

The expected type of the result value

key

The unique identifier for the command result to retrieve

Throws

if the stored value cannot be cast to type R

if the key is null or empty


abstract fun getCommandResult(): Map<String, Any>

Retrieves all stored command results as a read-only map.

Return

An immutable map containing all command result key-value pairs. Returns an empty map if no results are stored.