sdk-common / com.tomtom.online.sdk.common.functional / Try / ifSuccess

ifSuccess

abstract fun ifSuccess(@NonNull action: Consumer1<in T>): Try<T>!

Performs the provided action if the Try represents a success. Note: If action throws, then this method may throw an Exception.

Parameters

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

Return
Try<T>!: new composed Try.