sdk-common / com.tomtom.online.sdk.common.functional / Maybe / ifJust

ifJust

@NonNull abstract fun ifJust(@NonNull action: Consumer1<A>): Maybe<A>

Performs the provided action if the Maybe represents a Just. The stored value is not changed in any way.

Note: If action throws, then this method may throw an Exception.

Parameters

action - Consumer1<A>: a side-effect action to perform.

Return
Maybe<A>: a Maybe instance.