# 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

OrSpec
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

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

## Functions

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

Enables function invocation syntax on Spec instances.

isEmpty
Link copied to clipboard
open fun isEmpty(): Boolean
Returns whether empty is set.
isSatisfiedBy
Link copied to clipboard
open fun isSatisfiedBy(object: T): Boolean
Returns whether satisfied by is set.
or
Link copied to clipboard
open fun or(specs: Array<Spec<in T>>): OrSpec<T>
Or.