When
Adds a conditional expression with a result if the condition evaluates to true.
Return
A CaseWhen instance for method chaining
Parameters
T
The return type of the result expression
cond
The boolean condition to evaluate
result
The expression to return if the condition is true