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.
precondition
- Boolean: will be checked if it is true
message
- String: message used for the thrown exception
IllegalArgumentException
- thrown if the precondition is not true