# SimpleMapperRepo

class SimpleMapperRepo < FromKey , FromValue , ToKey , ToValue >(keyFromToTo: suspend FromKey .() -> ToKey , valueFromToTo: suspend FromValue .() -> ToValue , keyToToFrom: suspend ToKey .() -> FromKey , valueToToFrom: suspend ToValue .() -> FromValue ) : MapperRepo < FromKey , FromValue , ToKey , ToValue > (source)

Simple implementation of MapperRepo that uses provided conversion functions.

#### Type Parameters

FromKey

The original key type

FromValue

The original value type

ToKey

The target key type

ToValue

The target value type

## Constructors

SimpleMapperRepo
Link copied to clipboard
constructor(keyFromToTo: suspend FromKey .() -> ToKey , valueFromToTo: suspend FromValue .() -> ToValue , keyToToFrom: suspend ToKey .() -> FromKey , valueToToFrom: suspend ToValue .() -> FromValue )

## Properties

keyMapper
Link copied to clipboard
open val keyMapper : SimpleSuspendableMapper < FromKey , ToKey >

Provides a mapper for converting keys between inner and outer types.

valueMapper
Link copied to clipboard
open val valueMapper : SimpleSuspendableMapper < FromValue , ToValue >

Provides a mapper for converting values between inner and outer types.

## Functions

toInnerKey
Link copied to clipboard
open suspend override fun ToKey . toInnerKey (): FromKey

Converts a key from the outer type to the inner type.

toInnerValue
Link copied to clipboard
open suspend override fun ToValue . toInnerValue (): FromValue

Converts a value from the outer type to the inner type.

toOutKey
Link copied to clipboard
open suspend override fun FromKey . toOutKey (): ToKey

Converts a key from the inner type to the outer type.

toOutValue
Link copied to clipboard
open suspend override fun FromValue . toOutValue (): ToValue

Converts a value from the inner type to the outer type.