PostProcessorFilter

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

A post-processor filter, which changes the output of the given sub-filter.

Parameters

TInput

The type the filter accepts

TSubFilterResult

The type the sub-filter's returns

TResult

The type the filter returns

filter

The sub-filter to evaluate

transformDescription

Textual description of transform for better dump readability

transform

The function, which transforms the result of evaluate. Its input is both the input of evaluate and the result of filter

See also

Constructors

Link copied to clipboard
public PostProcessorFilter<TInput, TSubFilterResult, TResult> PostProcessorFilter<TInput extends Any, TSubFilterResult extends Any, TResult extends Any>(IFilter<TInput, ? extends TSubFilterResult> filter, TResult result)

Creates a new post-processor filter by specifying its return value.

public PostProcessorFilter<TInput, TSubFilterResult, TResult> PostProcessorFilter<TInput extends Any, TSubFilterResult extends Any, TResult extends Any>(IFilter<TInput, ? extends TSubFilterResult> filter, String transformDescription, Function2<TInput, TSubFilterResult, TResult> transform)

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, ? extends TSubFilterResult>> p0)
Link copied to clipboard