MappedEffectHandler

class MappedEffectHandler<I, O, II, OO>(effectHandler: Connectable<II, OO>, mapEffect: (I) -> II? = { null }, mapEvent: (OO) -> O? = { null }) : Connectable<I, O>

Creates a Connectable that delegates to effectHandler and maps the Effect and Events using mapEffect and mapEvent.

Constructors

Link copied to clipboard
constructor(effectHandler: Connectable<II, OO>, mapEffect: (I) -> II? = { null }, mapEvent: (OO) -> O? = { null })

Functions

Link copied to clipboard
open override fun connect(output: Consumer<O>): Connection<I>
Link copied to clipboard
fun <I, O> Connectable<I, O>.exclude(vararg effects: KClass<*>): Connectable<I, O>
fun <I, O> Connectable<I, O>.exclude(effects: List<KClass<*>>): Connectable<I, O>
Link copied to clipboard
fun <I, O> Connectable<I, O>.filter(predicate: (I) -> Boolean): Connectable<I, O>
Link copied to clipboard
inline fun <I, O, II, OO> Connectable<II, OO>.mapped(noinline mapEffect: (I) -> II? = { it as? II }, noinline mapEvent: (OO) -> O? = { it as? O }): Connectable<I, O>