corda / net.corda.client.fxutils / rx.Observable / recordAsAssociation

# recordAsAssociation

`fun <A, K> Observable<A>.recordAsAssociation(toKey: (A) -> K, merge: (K, oldValue: A, newValue: A) -> A = { _key, _oldValue, newValue -> newValue }): ObservableMap<K, A>`

This variant simply associates each event with its key.

### Parameters

`toKey` - Function retrieving the key to associate with.

`merge` - The function to be called if there is an existing element at the key.