createStoreMap

fun <T, R> StateCallback<T, R, *>?.createStoreMap(value: R): Map<NodeParameterKey<T, *>, Any?>

Create a store map and evaluate this state callback. The map is returned.

If this is null, an empty map is returned.

Note: May throw any exception since StateCallback.reduceState can itself throw any exception. Consider wrapping use of createStoreMap with runCatching, e.g. use withStoreMap instead.

See also

Wraps createStoreMap with error-handling for producing ExpectationResults