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

requireNotEmpty

@NonNull static fun <T : CharSequence!> requireNotEmpty(@Nullable charSequence: T?, @NonNull message: String): T

Checks if the given charseqence is not empty. If the object is empty or null then IllegalArgumentException is thrown with the specified message.

Parameters

charSequence - T?: will be checked if it is not empty or null

message - String: message used for the thrown exception

Exceptions

IllegalArgumentException - thrown if the provided charsequence is empty or null