Null Guard Filter
class NullGuardFilter<T, TResult>(nullResult: FilterResult<TResult>, filter: Filter<T, TResult>) : Filter<T?, TResult> , Iterable<Filter<T, TResult>> (source)
A filter, which forwards evaluation to the given filter, unless the input is null
; in this case, the result will be nullResult.
Parameters
T
The type the given filter accepts. This filter accepts its nullable form
TResult
The type filter returns
null Result
The result when the input is null
filter
The filter to evaluate