W3cubDocs

/Kotlin

SimpleEffect

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
@ExperimentalContracts interface SimpleEffect : Effect

An effect that can be observed after a function invocation.

See Also

ContractBuilder.returns

ContractBuilder.returnsNotNull

Functions

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

implies

Specifies that this effect, when observed, guarantees booleanExpression to be true.

abstract infix fun implies(
    booleanExpression: Boolean
): ConditionalEffect

Inheritors

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)

Returns

Describes a situation when a function returns normally with a given return value.

interface Returns : SimpleEffect
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)

ReturnsNotNull

Describes a situation when a function returns normally with any non-null return value.

interface ReturnsNotNull : SimpleEffect

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.contracts/-simple-effect/index.html