remove All What If Not Null
inline fun <T : MutableCollection<E>, E> T.removeAllWhatIfNotNull(element: Collection<E>?, whatIf: (T) -> Unit): T
Content copied to clipboard
An expression for removing a collection of element and invoking whatIf when the element is not null.
Return
Returns the original target object.
Parameters
element
A collection of elements should be removed into the target.
whatIf
An executable lambda function if the element it not null.
inline fun <T : MutableCollection<E>, E> T.removeAllWhatIfNotNull(element: Collection<E>?, whatIf: (T) -> Unit, whatIfNot: (T) -> Unit): T
Content copied to clipboard
An expression for removing an element and invoking whatIf when the element is not null.
Return
Returns the original target object.