ConditionalFilter

A filter, which forwards evaluation to the given filter, if the check function returns true. Otherwise, the result will be falseResult.

Parameters

TInput

The type the given filter accepts

TResult

The type filter returns

check

The function to decide if the evaluation should be forwarded to filter or return falseResult

falseResult

The result when the input is false

filter

The filter to evaluate

Constructors

Link copied to clipboard
constructor(check: (TInput) -> Boolean, falseResult: TResult?, filter: IFilter<TInput, TResult>)

Types

Link copied to clipboard
object Companion

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, TResult>>
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
open fun forEach(p0: Consumer<in IFilter<TInput, TResult>>)
Link copied to clipboard