Consumer

Added in 1.1.0

fun interface Consumer<T : Any?>

Known direct subclasses
TestConsumer

An implementation of Consumer to capture values during a test and allows developers to perform assertions on the values.


Compat version of java.util.function.Consumer

Parameters
<T : Any?>

the type of the input to the operation

Summary

Public functions

Unit
accept(value: T)

Performs this operation on the given argument.

Public functions

accept

Added in 1.1.0
fun accept(value: T): Unit

Performs this operation on the given argument.

Parameters
value: T

the input argument