FirstMatchFilter

A filter, which returns the first FilterResult.Match result from filters. Only skips if all sub-filters skip, and only yields mismatch if no sub-filters yield match.

Parameters

T

The type the filter accepts

TResult

The type the filter returns

filters

The sub-filters to evaluate

Constructors

Link copied to clipboard
constructor(vararg filters: Filter<T, out TResult>)

Alternative constructor with variable arguments

constructor(filters: Iterable<Filter<T, 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 TResult>>
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 TResult>>)
Link copied to clipboard