require Null
Requires that the given value is null, throwing IllegalArgumentException if it is not.
This function is the inverse of requireNotNull. On return, value is smart-cast to null.
Parameters
value
The value to check for nullness
Throws
if value is not null
Requires that the given value is null, throwing IllegalArgumentException with the given message if it is not.
This function is the inverse of requireNotNull. On return, value is smart-cast to null.
The lazyMessage lambda is only evaluated if value is not null.
Parameters
T
The type of the value to check
value
The value to check for nullness
lazy Message
If value is not null, it is passed to this lambda to produce an exception message
Throws
if value is not null