ConditionalFilter

public final class ConditionalFilter<TInput extends Object, TResult extends Object> implements IFilter<TInput, TResult>, Iterable<IFilter<TInput, TResult>>(source)

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
public ConditionalFilter<TInput, TResult> ConditionalFilter<TInput extends Any, TResult extends Any>(Function1<TInput, Boolean> check, TResult falseResult, IFilter<TInput, TResult> filter)

Types

Link copied to clipboard
public class Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
public TResult evaluate(TInput input)

Evaluates the filter with the given value.

Link copied to clipboard
Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public String dump()

Formats the current filter as a tree, and returns the formatted string.

Link copied to clipboard
public Unit forEach(Consumer<? super IFilter<TInput, TResult>> p0)
Link copied to clipboard