ConditionalFilter

public final class ConditionalFilter<T extends Object, TResult extends Object> implements Iterable<<Error class: unknown class><T, TResult>>(source)

A filter, which forwards evaluation to the given filter, if the check function returns true. Otherwise, the result will be falseResult.

Parameters

T

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<T, TResult> ConditionalFilter<T extends Any, TResult extends Any>(Function1<T, Boolean> check, <Error class: unknown class><TResult> falseResult, <Error class: unknown class><T, TResult> filter)

Functions

Link copied to clipboard
public <Error class: unknown class><? extends TResult> evaluate(T value)
Link copied to clipboard
public Iterator<<Error class: unknown class><T, TResult>> iterator()
Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public Unit forEach(Consumer<? super <Error class: unknown class><T, TResult>> p0)
Link copied to clipboard
public Spliterator<<Error class: unknown class><T, TResult>> spliterator()