public class SimpleCoAcceptor<A>
extends AbstractCoAcceptor
A simple implementation of interface CoAcceptor that takes a lambda as the accepting function.
interface CoAcceptor| Constructor and Description |
|---|
SimpleCoAcceptor(kotlin.jvm.functions.Function2<? super A,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
A simple implementation of
interface CoAcceptor that takes a lambda as the accepting function. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
acceptObject(A value,
kotlin.coroutines.Continuation<? super kotlin.Unit> p)
Accept a value, after
closed check and test for end of data. Invoke the lambda with the value. |
kotlin.jvm.functions.Function2<A,kotlin.coroutines.Continuation,java.lang.Object> |
getBlock() |
accept, acceptObjectclose, getClosed, getComplete, getResultacceptgetClosed, getComplete, getResultpublic SimpleCoAcceptor(@NotNull
kotlin.jvm.functions.Function2<? super A,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
A simple implementation of interface CoAcceptor that takes a lambda as the accepting function.
interface CoAcceptor@Nullable
public java.lang.Object acceptObject(A value,
@NotNull
kotlin.coroutines.Continuation<? super kotlin.Unit> p)
Accept a value, after closed check and test for end of data. Invoke the lambda with the value.
value - the input value@NotNull public kotlin.jvm.functions.Function2<A,kotlin.coroutines.Continuation,java.lang.Object> getBlock()