Filter

fun interface Filter<T, TResult>(source)

Functional interface for filtering.

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

Parameters

T

The type the filter accepts

TResult

The type the filter returns

Inheritors

Functions

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

Evaluates the filter with the given value.

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.