IntegerEffectIdSource

class IntegerEffectIdSource(initalValue: Int = 1) : EffectIdSource

An EffectIdSource that generates monotonically increasing integers as ids, always incrementing by 1.

The initial value is initalValue, which defaults to 1. The initial value can be passed as a parameter to support scenarios of state restoration, where a previously existing id value might need to be used as the new baseline to avoid conflicts.

Constructors

Link copied to clipboard
constructor(initalValue: Int = 1)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun generateId(): EffectId