OrSpec

open class OrSpec<T> : CompositeSpec<T> (source)

A CompositeSpec which requires any one of its specs to be true in order to evaluate to true. Uses lazy evaluation.

Parameters

<T>

The target type for this Spec

Constructors

Link copied to clipboard
constructor()
constructor(specs: Array<Spec<in T>>)
constructor(specs: Iterable<out Spec<in T>>)

Properties

Link copied to clipboard
val EMPTY: OrSpec<out Any>

Functions

Link copied to clipboard
open fun <T> empty(): OrSpec<T>
Link copied to clipboard
fun equals(o: Any): Boolean
Link copied to clipboard
open fun getSpecs(): List<Spec<in T>>
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
operator fun <T> Spec<T>.invoke(arg: T): Boolean

Enables function invocation syntax on Spec instances.

Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun isSatisfiedBy(object: T): Boolean
Link copied to clipboard
open fun or(specs: Array<Spec<in T>>): OrSpec<T>