setRetained

open override fun setRetained(retained: Boolean?): Telemetry.Item?

Sets whether the item is to be retained in clear() operation or not. This is initially true for items that whose value is computed with a value producer; otherwise, it is initially false.

Return

the receiver

Parameters

retained

if true, then the value will be retained during a clear(). Null will return the setting to its initial value.

See also