MutableActionParameters

Class

Android
public class MutableActionParameters
internal constructor(internal val map: MutableMap<Key<out Any>, Any> = mutableMapOf()) :
    ActionParameters()

Mutable version of ActionParameters. Allows for editing the underlying data, and adding or removing key-value pairs.

Functions

public operator fun <T : Any> set(key: Key<T>, value: T?): T?

Sets a key value pair in MutableParameters. If the value is null, the key is removed from the parameters.

Parameters

keythe parameter to set
valuethe value to assign to this parameter

Returns

the previous value associated with the key, or null if the key was not present
public fun <T : Any> remove(key: Key<T>): T?

Removes an item from this MutableParameters.

Parameters

keythe parameter to remove

Returns

the original value of the parameter
public fun clear(): Unit

Removes all parameters from this MutableParameters.