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

requireTrue

static fun requireTrue(precondition: Boolean, @NonNull message: String): Unit

Checks if the given precondition is true. If the object is false then IllegalArgumentException is thrown with the specified message.

Parameters

precondition - Boolean: will be checked if it is true

message - String: message used for the thrown exception

Exceptions

IllegalArgumentException - thrown if the precondition is not true