doc / ch.tutteli.atrium.core

Package ch.tutteli.atrium.core

Contains the CoreFactory.

Types

CoreFactory

expect interface CoreFactory : CoreFactoryCommon

The platform specific minimum contract of the 'abstract factory' of atrium-core.

CoreFactoryCommon

interface CoreFactoryCommon

The minimum contract of the 'abstract factory' of atrium-core for any platform.

Either

sealed class Either<out L, out R>

Represents a disjoint union i.e. a type with two possibilities, either Left or Right.

Left

data class Left<L> : Either<L, Nothing>

The left case of an Either.

None

object None : Option<Nothing>

Represents an absent value in terms of Option.

Option

sealed class Option<out T>

Represents an optional value with map, flatMap, fold and getOrElse to transform it.

Right

data class Right<R> : Either<Nothing, R>

The right case of an Either.

Some

data class Some<T> : Option<T>

Represents a present value in terms of Option.

Annotations

ExperimentalNewExpectTypes

annotation class ExperimentalNewExpectTypes

Extensions for External Classes

kotlin.Function0

Properties

coreFactory

val coreFactory: CoreFactory

The access point to an implementation of CoreFactory.

falseProvider

val falseProvider: () -> Boolean

Returns false on calling.

trueProvider

val trueProvider: () -> Boolean

Returns true on calling.

Functions

flatMap

fun <L, R, T> Either<L, R>.flatMap(f: (R) -> Either<L, T>): Either<L, T>

getOrElse

fun <T> Option<T>.getOrElse(default: () -> T): T