Filter

public interface Filter<T extends Object, TResult extends Object>(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
public abstract FilterResult<? extends TResult> evaluate(T value)

Evaluates the filter with the given value.

Inherited functions

Link copied to clipboard
public final String dump()

Formats a filter chain as a tree with ASCII characters, and returns the formatted string.