OptionalFilter

Basically a NullGuardFilter for Java users using Optional.

Parameters

T

The type the given filter accepts

TResult

The type filter returns

nullResult

The result when the input is not present

filter

The filter to evaluate

Constructors

Link copied to clipboard
constructor(nullResult: FilterResult<TResult>, filter: Filter<T, TResult>)

Functions

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

Evaluates the filter with the given value.

Link copied to clipboard
open operator override fun iterator(): Iterator<Filter<T, TResult>>
Link copied to clipboard
open override fun toString(): String

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.

Link copied to clipboard
open fun forEach(p0: Consumer<in Filter<T, TResult>>)
Link copied to clipboard