Package-level declarations

Types

Link copied to clipboard
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>>

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

Link copied to clipboard
class ConjunctionFilter<T>(filters: Iterable<<Error class: unknown class><T, out <Error class: unknown class>>>) : Iterable<<Error class: unknown class><T, out <Error class: unknown class>>>

A filter, which applies the logical AND operation between the given filters and returns the result. Only skips if all sub-filters skip, and only yields match if no sub-filters yield mismatch.

Link copied to clipboard
class ContainingFilter<T>(collection: Collection<T>) : Iterable<T>

A filter, which only yields a matching result if the given collection contains the input. This filter never skips.

Link copied to clipboard
class DisjunctionFilter<T>(filters: Iterable<<Error class: unknown class><T, out <Error class: unknown class>>>) : Iterable<<Error class: unknown class><T, out <Error class: unknown class>>>

A filter, which applies the logical OR operation between the given filters and returns the result. Only skips if all sub-filters skip, and only yields mismatch if no sub-filters yield match.

Link copied to clipboard
class EqualityFilter<T>(expectedValue: T)

A filter, which succeeds when the given value is expectedValue, fails otherwise, and never skips.

Link copied to clipboard
class FirstMatchFilter<T, TResult : Any>(filters: Iterable<<Error class: unknown class><T, out TResult>>) : Iterable<<Error class: unknown class><T, out TResult>>

A filter, which returns the first IFilter.Result.Match result from filters. Only skips if all sub-filters skip, and only yields mismatch if no sub-filters yield match.

Link copied to clipboard
class InequalityFilter<T>(unexpectedValue: T)

A filter, which fails when the given value is unexpectedValue, succeeds otherwise, and never skips.

Link copied to clipboard
class NegationFilter<T>(filter: <Error class: unknown class><T, out <Error class: unknown class>>) : Iterable<<Error class: unknown class><T, out <Error class: unknown class>>>

A filter, which returns the opposite result of the provided filter.

Link copied to clipboard
class NullGuardFilter<T, TResult>(nullResult: <Error class: unknown class><TResult>, filter: <Error class: unknown class><T, TResult>) : Iterable<<Error class: unknown class><T, TResult>>

A filter, which forwards evaluation to the given filter, unless the input is null; in this case, the result will be nullResult.

Link copied to clipboard
class OptionalFilter<T, TResult>(nullResult: <Error class: unknown class><TResult>, filter: <Error class: unknown class><T, TResult>) : Iterable<<Error class: unknown class><T, TResult>>

Basically a NullGuardFilter for Java users using Optional.

Link copied to clipboard
class PostProcessorFilter<T, TFilterResult, TResult : Any>(filter: <Error class: unknown class><T, out TFilterResult>, transform: (input: T, <Error class: unknown class><out TFilterResult>) -> <Error class: unknown class><out TResult>) : Iterable<<Error class: unknown class><T, out TFilterResult>>

A post-processor filter, which enables the output of the given sub-filter to be changed.

Link copied to clipboard
class PreProcessorFilter<TSource, TFilter, TResult>(transform: (TSource) -> TFilter, filter: <Error class: unknown class><TFilter, TResult>) : Iterable<<Error class: unknown class><TFilter, TResult>>

A pre-processor filter, which applies a transform to the value before evaluating the sub-filter on it. For more advanced control over invoking filter, please use an arrow function.

Link copied to clipboard

A filter, which yields a successful result only when the input number is within the defined range, and never skips.

Link copied to clipboard

A filter, yields a successful result only, when the provided regular expression matches the input.