SimpleSuspendableMapperImpl

class SimpleSuspendableMapperImpl<T1, T2>(t1: suspend (T2) -> T1, t2: suspend (T1) -> T2) : SimpleSuspendableMapper<T1, T2> (source)

Implementation of SimpleSuspendableMapper that uses suspending lambda functions for conversion.

Parameters

t1

Suspending function to convert from T2 to T1

t2

Suspending function to convert from T1 to T2

Type Parameters

T1

The first type

T2

The second type

Constructors

Link copied to clipboard
constructor(t1: suspend (T2) -> T1, t2: suspend (T1) -> T2)

Functions

Link copied to clipboard
@JvmName(name = "convertFromT2")
suspend fun <T1, T2> SimpleSuspendableMapper<T1, T2>.convert(from: T2): T1

Converts from of type T2 to type T1 using this suspending mapper.

@JvmName(name = "convertFromT1")
suspend fun <T1, T2> SimpleSuspendableMapper<T1, T2>.convert(from: T1): T2

Converts from of type T1 to type T2 using this suspending mapper.

Link copied to clipboard
open suspend override fun convertToT1(from: T2): T1
Link copied to clipboard
open suspend override fun convertToT2(from: T1): T2