Mapper<K1, V1, K2, V2>
Reactive function that can be mapped over a collection.
EagerCollection.map
accepts a constructor function of a top-level class that implements this Mapper
interface.
Each implementation of Mapper
provides a mapEntry
function, which produces some key-value pairs from each key-values Entry
.
Type Parameters
Type Parameter | Description |
---|---|
K1 extends Json | Type of input keys. |
V1 extends Json | Type of input values. |
K2 extends Json | Type of output keys. |
V2 extends Json | Type of output values. |
Methods
mapEntry()
mapEntry(key, values): Iterable<[K2, V2]>
From an input key
-values
entry, produce some key-value pairs to associate in the output.
Parameters
Parameter | Type | Description |
---|---|---|
key | K1 | A key found in the input collection. |
values | Values <V1 > | The values associated with key in the input collection. |
Returns
Iterable
<[K2
, V2
]>
Key-value pairs to associate in the output collection.