ConditionalFilter

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

Functions

Link copied to clipboard
open fun evaluate(value: T): <Error class: unknown class><out TResult>
Link copied to clipboard
open operator override fun iterator(): Iterator<<Error class: unknown class><T, TResult>>
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open fun forEach(p0: Consumer<in <Error class: unknown class><T, TResult>>)
Link copied to clipboard
open fun spliterator(): Spliterator<<Error class: unknown class><T, TResult>>