sdk-common / com.tomtom.online.sdk.common.util / Preconditions / checkNotNull

checkNotNull

static fun checkNotNull(obj: Any!, varName: String!): Unit static fun <T : Any!> checkNotNull(reference: T): T

Ensures that an object reference passed as a parameter to the calling method is not null.

Parameters

reference - T: an object reference

Exceptions

NullPointerException - if reference is null

Return
T: the non-null reference that was validated