IFilter

fun interface IFilter<TInput, TResult : Any>(source)

Functional interface for filtering.

When used as a functional interface, it will be ugly when dumped. If the filter evaluates sub-filters, implement Iterable to show them in the dumped tree.

Parameters

TInput

The type the filter accepts

TResult

The type the filter returns

Inheritors

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
abstract fun evaluate(input: TInput): TResult?

Evaluates the filter with the given value.