StateRecord


Snapshot local value of a state object.

Summary

Public constructors

Cmn
StateRecord(snapshotId: Int)
Cmn

Public functions

abstract Unit

Copy the value into this state record from another for the same state object.

Cmn
abstract StateRecord

Create a new state record for the same state object.

Cmn
open StateRecord
create(snapshotId: Int)

Create a new state record for the same state object and provided snapshotId.

Cmn

Public constructors

StateRecord

StateRecord()

StateRecord

StateRecord(snapshotId: Int)

Public functions

assign

abstract fun assign(value: StateRecord): Unit

Copy the value into this state record from another for the same state object.

create

abstract fun create(): StateRecord

Create a new state record for the same state object. Consider also implementing the create overload that provides snapshotId for faster record construction when snapshot id is known.

create

open fun create(snapshotId: Int): StateRecord

Create a new state record for the same state object and provided snapshotId. This allows to implement an optimized version of create to avoid accessing currentSnapshot when snapshot id is known. The default implementation provides a backwards compatible behavior, and should be overridden if StateRecord subclass supports this optimization.