InputNullGuardFilter

public final class InputNullGuardFilter<TInput extends Object, TResult extends Object> implements IFilter<TInput, TResult>, Iterable<IFilter<TInput, TResult>>(source)

A filter, which forwards evaluation to the given filter, if the input is not null. If the input is null, the filter will return inputNullResult.

Parameters

TInput

The type the given filter accepts. This filter accepts its nullable form

TResult

The type filter returns

inputNullResult

The result when the input is null

filter

The filter to evaluate

Constructors

Link copied to clipboard
public InputNullGuardFilter<TInput, TResult> InputNullGuardFilter<TInput extends Any, TResult extends Any>(TResult inputNullResult, IFilter<TInput, TResult> filter)

Functions

Link copied to clipboard
public TResult evaluate(TInput input)

Evaluates the filter with the given value.

Link copied to clipboard
Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public String dump()

Formats the current filter as a tree, and returns the formatted string.

Link copied to clipboard
public Unit forEach(Consumer<? super IFilter<TInput, TResult>> p0)
Link copied to clipboard