InvocationResult

The result of a callback which may be a value, null or absent entirely if the callback wasn't suitable. Similar in design to Optional but allows for null as a valid value.

Parameters

<R>

the result type

Functions

Link copied to clipboard
open fun get(): R
Return the result of the invocation or null if the callback wasn't suitable.
open fun get(fallback: R): R
Return the result of the invocation or the given fallback if the callback wasn't suitable.
Link copied to clipboard
open fun hasResult(): Boolean
Return true if a result in present.
Link copied to clipboard
Return an InvocationResult instance representing no result.
Link copied to clipboard
open fun <R> of(value: R): LambdaSafe.InvocationResult<R>
Create a new InvocationResult instance with the specified value.