mutableHistoryOf
fun <T> mutableHistoryOf( initial: T, projection: MutableProjection<T>, clock: Clock = Clock.System): MutableHistory<T>
Content copied to clipboard
Creates a new MutableHistory, with an aggregate with an initial value and a projection for incremental changes.
Parameters
initial
the initial aggregate value.
projection
the MutableProjection value.
clock
the Clock used to generate new events.
T
the type of the aggregate.
fun <T> mutableHistoryOf( initial: T, projection: MutableProjection<T>, vararg events: Pair<EventIdentifier, ByteArray>, clock: Clock = Clock.System): MutableHistory<T>
Content copied to clipboard
Creates a new MutableHistory, with an aggregate with an initial value and a projection for incremental changes.
Parameters
initial
the initial aggregate value.
projection
the MutableProjection value.
events
some events to pre-populate the history.
clock
the Clock used to generate new events.
T
the type of the aggregate.