# applyDiff

suspend fun < Id , Registered > MutableMap < Id , Registered >. applyDiff (other: ReadCRUDRepo < Registered , Id >)(source)

Applies the difference between this map and a ReadCRUDRepo to this map. Modifies this mutable map to match the state of the repository.

#### Parameters

other

The repository to synchronize with

#### Type Parameters

Id

The type of IDs

Registered

The type of objects

suspend fun < Id , Registered > KeyValueRepo < Id , Registered >. applyDiff (diff: MapDiff < Id , Registered >)(source)

Applies the given diff to this KeyValueRepo: removes entries in MapDiff.removed, updates entries in MapDiff.changed, and adds entries in MapDiff.added.

#### Parameters

diff

The diff to apply

#### Type Parameters

Id

The type of keys

Registered

The type of values

suspend fun < Id , Registered > KeyValueRepo < Id , Registered >. applyDiff (other: Map < Id , Registered >)(source)

Computes the diff between this KeyValueRepo and other, then applies the diff to this repo.

#### Parameters

other

The target map state to synchronize to

#### Type Parameters

Id

The type of keys

Registered

The type of values

suspend fun < Id , Registered > MutableMap < Id , Registered >. applyDiff (other: ReadKeyValueRepo < Id , Registered >)(source)

Computes the diff between this MutableMap and the given ReadKeyValueRepo, then applies the diff to this map.

#### Parameters

other

The repository whose state to synchronize to

#### Type Parameters

Id

The type of keys

Registered

The type of values

suspend fun < Id , Registered > KeyValuesRepo < Id , Registered >. applyDiff (diff: MapDiff < Id , List < Registered >>)(source)

Applies the given diff to this KeyValuesRepo: clears keys in MapDiff.removed, sets entries in MapDiff.changed and MapDiff.added.

#### Parameters

diff

The diff to apply

#### Type Parameters

Id

The type of keys

Registered

The type of values

suspend fun < Id , Registered > KeyValuesRepo < Id , Registered >. applyDiff (other: Map < Id , List < Registered >>)(source)

Computes the diff between this KeyValuesRepo and other, then applies the diff to this repo.

#### Parameters

other

The target map state to synchronize to

#### Type Parameters

Id

The type of keys

Registered

The type of values

suspend fun < Id , Registered > MutableMap < Id , List < Registered >>. applyDiff (other: ReadKeyValuesRepo < Id , Registered >)(source)

Computes the diff between this MutableMap and the given ReadKeyValuesRepo, then applies the diff to this map.

#### Parameters

other

The repository whose state to synchronize to

#### Type Parameters

Id

The type of keys

Registered

The type of values