MutableProjection

interface MutableProjection<T>

A MutableProjection applies events to a model of type T. When events are applied with the forward method, some changes may be generated and issued to the ChangeScope. These changes will then be made available when the backward method is called.

If multiple changes are issued in the ChangeScope, the backward method will be called once for each of these changes. The provided event will remain the same in both cases.

Functions

Link copied to clipboard
abstract fun backward(    model: T,     identifier: EventIdentifier,     data: MutableByteGapBuffer,     from: Int,     until: Int,     changeData: MutableByteGapBuffer,     changeFrom: Int,     changeUntil: Int): T

Moves the MutableProjection backward, and returns the new instance of T that should be used.

Link copied to clipboard
abstract fun ChangeScope.forward(    model: T,     identifier: EventIdentifier,     data: MutableByteGapBuffer,     from: Int,     until: Int): T

Moves the MutableProjection forward, and returns the new instance of T that should be used.