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.

Since

0.7

Parameters

<T>

The target type for this Spec

Constructors

Link copied to clipboard
constructor()
Creates a new OrSpec.
constructor(specs: Array<Spec<in T>>)
Creates a new OrSpec.
constructor(specs: Iterable<out Spec<in T>>)
Creates a new OrSpec.

Properties

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

Functions

Link copied to clipboard
open fun <T> empty(): OrSpec<T>
Empty.
Link copied to clipboard
fun equals(o: Any): Boolean
Link copied to clipboard
open fun getSpecs(): List<Spec<in T>>
Returns the specs.
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
Returns whether empty is set.
Link copied to clipboard
open fun isSatisfiedBy(object: T): Boolean
Returns whether satisfied by is set.
Link copied to clipboard
open fun or(specs: Array<Spec<in T>>): OrSpec<T>
Or.