takeIf_ method
Kotlin-esque "operator" to take this
if condition
is true
, or else return null
.
Implementation
T? takeIf_(bool Function(T) condition) => condition(this) ? this : null;
Kotlin-esque "operator" to take this
if condition
is true
, or else return null
.
T? takeIf_(bool Function(T) condition) => condition(this) ? this : null;