MapMappingConverters

Namespace for containing various conversion utilities dealing with Map mapping

Functions

Link copied to clipboard

Chains this map converter with an entry converter, yielding a new converter which performs a two stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard

Chains this map converter with a key converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard
fun <F, TK, TK2, V> ConvertsTo<F, Map<TK, V>>.mapConvertsKeysTo(keyConverter: ConvertsTo<TK, TK2>): ConvertsTo<F, Map<TK2, V>>

Chains this map converter with a key converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard
fun <F, TK, TV, TK2, TV2> ConvertsTo<F, Map<TK, TV>>.mapConvertsTo(entryConverter: ConvertsTo<Pair<TK, TV>, Pair<TK2, TV2>>): ConvertsTo<F, Map<TK2, TV2>>

Chains this map converter with an entry converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard

Chains this map converter with a value converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard
fun <F, K, TV, TV2> ConvertsTo<F, Map<K, TV>>.mapConvertsValuesTo(valueConverter: ConvertsTo<TV, TV2>): ConvertsTo<F, Map<K, TV2>>

Chains this map converter with a value converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Link copied to clipboard
fun <FK, FV, TK, TV> of(entryConverter: Converter<Pair<FK, FV>, Pair<TK, TV>>): Converter<Map<FK, FV>, Map<TK, TV>>

Creates a two-way converter for transforming between Map with keys of type FK and values of type FV to Map with keys of type TK and values of type TV

fun <FK, FV, TK, TV> of(entryConverter: ConvertsFrom<Pair<FK, FV>, Pair<TK, TV>>): ConvertsFrom<Map<FK, FV>, Map<TK, TV>>

Creates a one-way converter for transforming Map with keys of type TK and values of type TV to Map with keys of type FK and values of type FV

fun <FK, FV, TK, TV> of(entryConverter: ConvertsTo<Pair<FK, FV>, Pair<TK, TV>>): ConvertsTo<Map<FK, FV>, Map<TK, TV>>

Creates a one-way converter for transforming Map with keys of type FK and values of type FV to Map with keys of type TK and values of type TV

Link copied to clipboard
fun <FK, TK, V> ofKeys(keyConverter: Converter<FK, TK>): Converter<Map<FK, V>, Map<TK, V>>

Creates a two-way converter for transforming between Map with keys of type FK and Map with keys of type TK. The values of maps are unchanged.

fun <FK, TK, V> ofKeys(keyConverter: ConvertsFrom<FK, TK>): ConvertsFrom<Map<FK, V>, Map<TK, V>>

Creates a one-way converter for transforming Map with keys of type TK to Map with keys of type FK. The values of the map are unchanged.

fun <FK, TK, V> ofKeys(keyConverter: ConvertsTo<FK, TK>): ConvertsTo<Map<FK, V>, Map<TK, V>>

Creates a one-way converter for transforming Map with keys of type FK to Map with keys of type TK. The values of the map are unchanged.

Link copied to clipboard
fun <K, FV, TV> ofValues(valueConverter: Converter<FV, TV>): Converter<Map<K, FV>, Map<K, TV>>

Creates a two-way converter for transforming between Map with values of type FV and Map with values of type TV. The keys of the map are unchanged.

fun <K, FV, TV> ofValues(valueConverter: ConvertsFrom<FV, TV>): ConvertsFrom<Map<K, FV>, Map<K, TV>>

Creates a one-way converter for transforming Map with values of type TV to Map with values of type FV. The keys of the map are unchanged.

fun <K, FV, TV> ofValues(valueConverter: ConvertsTo<FV, TV>): ConvertsTo<Map<K, FV>, Map<K, TV>>

Creates a one-way converter for transforming Map with values of type FV to Map with values of type TV. The keys of the map are unchanged.