ifPresent

open fun ifPresent(consumer: Consumer<V>)

Runs the consumer on the value of the reference if it is not null.

Parameters

consumer

the consumer to run