Null Guard Filter
public final class NullGuardFilter<T extends Object, TResult extends Object> implements 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
Constructors
Link copied to clipboard
public NullGuardFilter<T, TResult> NullGuardFilter<T extends Any, TResult extends Any>(FilterResult<TResult> nullResult, Filter<T, TResult> filter)