commonMain.it.unibo.tuprolog.solve.SideEffectsBuilder.kt Maven / Gradle / Ivy
package it.unibo.tuprolog.solve
import it.unibo.tuprolog.solve.impl.SideEffectsBuilderImpl
import it.unibo.tuprolog.utils.dequeOf
import kotlin.js.JsName
import kotlin.jvm.JvmStatic
interface SideEffectsBuilder : SideEffectFactory {
@JsName("sideEffects")
val sideEffects: MutableList
@JsName("buildArray")
fun buildArray(): Array = sideEffects.toTypedArray()
@JsName("build")
fun build(): List = sideEffects.toList()
companion object {
@JvmStatic
@JsName("empty")
fun empty(): SideEffectsBuilder =
SideEffectsBuilderImpl(dequeOf())
@JvmStatic
@JsName("ofIterable")
fun of(sideEffects: Iterable): SideEffectsBuilder =
SideEffectsBuilderImpl(dequeOf(sideEffects))
@JvmStatic
@JsName("ofSequence")
fun of(sideEffects: Sequence): SideEffectsBuilder =
SideEffectsBuilderImpl(dequeOf(sideEffects))
@JvmStatic
@JsName("of")
fun of(vararg sideEffects: SideEffect): SideEffectsBuilder =
SideEffectsBuilderImpl(dequeOf(*sideEffects))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy