package strikt.arrow

Fields

Name Description
val b: Assertion.Builder<R>

Unwraps the containing value of the Either.Right

val a: Assertion.Builder<L>

Unwraps the containing value of the Either.Left

val a: Assertion.Builder<A>

Unwraps the containing value of the Validated.Valid

val t: Assertion.Builder<T>

Unwraps the containing value of the Some

val value: Assertion.Builder<T>

Unwraps the containing value of the Success

val exception: Assertion.Builder<Throwable>

Unwraps the containing Throwable value of the Failure

val e: Assertion.Builder<E>

Unwraps the containing value of the Validated.Invalid

Methods

isRight

fun <L, R> Assertion.Builder><Either<L, R>>.isRight(): @Suppress("UNCHECKED_CAST")<Either.Right<R>>

Asserts that the Either is Either.Right

Receiver

Name Description
Assertion.Builder><Either<L, R>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Either.Right<R>>

Assertion builder over the same subject that is now known to be a Either.Right.

isRight

infix fun <L, R> Assertion.Builder><Either<L, R>>.isRight(value: R): @Suppress("UNCHECKED_CAST") infix<Either.Right<R>>

Asserts that the Either is Either.Right and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Either<L, R>>

Parameters

Name Description
value: R

Value to compare to the Either's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Either.Right<R>>

Assertion builder over the same subject that is now known to be a Either.Right.

isLeft

fun <L, R> Assertion.Builder><Either<L, R>>.isLeft(): @Suppress("UNCHECKED_CAST")<Either.Left<L>>

Asserts that the Either is Either.Left

Receiver

Name Description
Assertion.Builder><Either<L, R>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Either.Left<L>>

Assertion builder over the same subject that is now known to be a Either.Left.

isLeft

infix fun <L, R> Assertion.Builder><Either<L, R>>.isLeft(value: L): @Suppress("UNCHECKED_CAST") infix<Either.Left<L>>

Asserts that the Either is Either.Left and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Either<L, R>>

Parameters

Name Description
value: L

Value to compare to the Either's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Either.Left<L>>

Assertion builder over the same subject that is now known to be a Either.Left.

isNone

fun <T> Assertion.Builder><Option<T>>.isNone(): @Suppress("UNCHECKED_CAST")<None>

Asserts that the Option is None

Receiver

Name Description
Assertion.Builder><Option<T>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<None>

Assertion builder over the same subject that is now known to be a None.

isSome

fun <T> Assertion.Builder><Option<T>>.isSome(): @Suppress("UNCHECKED_CAST")<Some<T>>

Asserts that the Option is Some

Receiver

Name Description
Assertion.Builder><Option<T>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Some<T>>

Assertion builder over the same subject that is now known to be a Some.

isSome

infix fun <T> Assertion.Builder><Option<T>>.isSome(value: T): @Suppress("UNCHECKED_CAST") infix<Some<T>>

Asserts that the Option is Some and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Option<T>>

Parameters

Name Description
value: T

Value to compare to the Option's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Some<T>>

Assertion builder over the same subject that is now known to be a Some.

isSuccess

fun <T> Assertion.Builder><Try<T>>.isSuccess(): @Suppress("UNCHECKED_CAST")<Success<T>>

Asserts that the Try is Success

Receiver

Name Description
Assertion.Builder><Try<T>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Success<T>>

Assertion builder over the same subject that is now known to be a Success.

isSuccess

infix fun <T> Assertion.Builder><Try<T>>.isSuccess(value: T): @Suppress("UNCHECKED_CAST") infix<Success<T>>

Asserts that the Try is Success and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Try<T>>

Parameters

Name Description
value: T

Value to compare to the Try's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Success<T>>

Assertion builder over the same subject that is now known to be a Success.

isFailure

fun <T> Assertion.Builder><Try<T>>.isFailure(): @Suppress("UNCHECKED_CAST")<Failure>

Asserts that the Try is Failure

Receiver

Name Description
Assertion.Builder><Try<T>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Failure>

Assertion builder over the same subject that is now known to be a Failure.

isValid

fun <E, A> Assertion.Builder><Validated<E, A>>.isValid(): @Suppress("UNCHECKED_CAST")<Validated.Valid<A>>

Receiver

Name Description
Assertion.Builder><Validated<E, A>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Validated.Valid<A>>

Assertion builder over the same subject that is now known to be a Validated.Valid.

isValid

infix fun <E, A> Assertion.Builder><Validated<E, A>>.isValid(value: A): @Suppress("UNCHECKED_CAST") infix<Validated.Valid<A>>

Asserts that the Validated is Validated.Valid and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Validated<E, A>>

Parameters

Name Description
value: A

Value to compare to the Validated's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Validated.Valid<A>>

Assertion builder over the same subject that is now known to be a Validated.Valid.

isInvalid

fun <E, A> Assertion.Builder><Validated<E, A>>.isInvalid(): @Suppress("UNCHECKED_CAST")<Validated.Invalid<E>>

Asserts that the Validated is Validated.Invalid

Receiver

Name Description
Assertion.Builder><Validated<E, A>>

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST")<Validated.Invalid<E>>

Assertion builder over the same subject that is now known to be a Validated.Invalid.

isInvalid

infix fun <E, A> Assertion.Builder><Validated<E, A>>.isInvalid(value: E): @Suppress("UNCHECKED_CAST") infix<Validated.Invalid<E>>

Asserts that the Validated is Validated.Invalid and that it contains the exact value

Receiver

Name Description
Assertion.Builder><Validated<E, A>>

Parameters

Name Description
value: E

Value to compare to the Validated's wrapped value

ReturnValue

Name Description
@Suppress("UNCHECKED_CAST") infix<Validated.Invalid<E>>

Assertion builder over the same subject that is now known to be a Validated.Invalid.