ifPresent

open fun ifPresent(@NonNull consumer: Consumer<V>)

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

Parameters

consumer

the consumer to run