PostProcessorFilter

class PostProcessorFilter<TInput, TSubFilterResult : Any, TResult : Any>(filter: IFilter<TInput, out TSubFilterResult>, transformDescription: String, transform: (input: TInput, result: TSubFilterResult?) -> TResult?) : IFilter<TInput, TResult> , Iterable<IFilter<TInput, out 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
constructor(filter: IFilter<TInput, out TSubFilterResult>, result: TResult)

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

constructor(filter: IFilter<TInput, out TSubFilterResult>, transformDescription: String, transform: (input: TInput, result: TSubFilterResult?) -> TResult?)

Functions

Link copied to clipboard
open override fun evaluate(input: TInput): TResult?

Evaluates the filter with the given value.

Link copied to clipboard
open operator override fun iterator(): Iterator<IFilter<TInput, out TSubFilterResult>>
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open fun dump(): String

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

Link copied to clipboard
Link copied to clipboard