Skip to main content

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 ParameterDescription
K1 extends JsonType of input keys.
V1 extends JsonType of input values.
K2 extends JsonType of output keys.
V2 extends JsonType of output values.

Methods​

mapEntry()​

mapEntry(
key,
values,
context): Iterable<[K2, V2]>

From an input key-values entry, produce some key-value pairs to associate in the output.

Parameters​

ParameterTypeDescription
keyK1A key found in the input collection.
valuesValues<V1>The values associated with key in the input collection.
contextContextThe Skip runtime context, which can be used to create/access new collections during the map

Returns​

Iterable<[K2, V2]>

Key-value pairs to associate in the output collection.