NullGuardFilter

public final class NullGuardFilter<T extends Object, TResult extends Object> implements Iterable<<Error class: unknown class><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

nullResult

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>(<Error class: unknown class><TResult> nullResult, <Error class: unknown class><T, TResult> filter)

Functions

Link copied to clipboard
public <Error class: unknown class><? extends TResult> evaluate(T value)
Link copied to clipboard
public Iterator<<Error class: unknown class><T, TResult>> iterator()
Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public Unit forEach(Consumer<? super <Error class: unknown class><T, TResult>> p0)
Link copied to clipboard
public Spliterator<<Error class: unknown class><T, TResult>> spliterator()