PostProcessorFilter

A post-processor filter, which enables the output of the given sub-filter to be changed.

Useful, when the sub-filter doesn't yield a result (like ConjunctionFilter or DisjunctionFilter)

Parameters

T

The type the filter accepts

TFilterResult

The type the sub-filter's returns

TResult

The type the filter returns

filter

The sub-filter to evaluate

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
constructor(filter: Filter<T, out TFilterResult>, result: TResult)

Creates a new post-processor filter by specifying FilterResult.Match.result.

constructor(filter: Filter<T, out TFilterResult>, transform: (input: T, result: FilterResult<out TFilterResult>) -> FilterResult<out TResult>)

Functions

Link copied to clipboard
open override fun evaluate(value: T): FilterResult<out TResult>

Evaluates the filter with the given value.

Link copied to clipboard
open operator override fun iterator(): Iterator<Filter<T, out TFilterResult>>
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
fun Filter<*, *>.dump(): String

Formats a filter chain as a tree with ASCII characters, and returns the formatted string.

Link copied to clipboard
open fun forEach(p0: Consumer<in Filter<T, out TFilterResult>>)
Link copied to clipboard