sdk-common / com.tomtom.online.sdk.common.functional / CheckedFunction1

CheckedFunction1

@FunctionalInterface interface CheckedFunction1<A : Any!, R : Any!>

Represents a function with a single argument that can throw a checked exception.

Functions

apply

abstract fun apply(value: A): R

Applies this function to the given argument. Exception may be thrown while doing this.

asUnchecked

open fun asUnchecked(): ((A) -> R)!

Produces unchecked function from this function wrapping the possibly thrown exception in runtime exception.