commonMain.it.unibo.tuprolog.solve.sideffects.SideEffectsBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve.sideffects
import it.unibo.tuprolog.solve.sideffects.impl.SideEffectsBuilderImpl
import it.unibo.tuprolog.utils.dequeOf
import kotlin.jvm.JvmStatic
interface SideEffectsBuilder : SideEffectFactory {
val sideEffects: MutableList
fun buildArray(): Array = sideEffects.toTypedArray()
fun build(): List = sideEffects.toList()
companion object {
@JvmStatic
fun empty(): SideEffectsBuilder = SideEffectsBuilderImpl(dequeOf())
@JvmStatic
fun of(sideEffects: Iterable): SideEffectsBuilder = SideEffectsBuilderImpl(dequeOf(sideEffects))
@JvmStatic
fun of(sideEffects: Sequence): SideEffectsBuilder = SideEffectsBuilderImpl(dequeOf(sideEffects))
@JvmStatic
fun of(vararg sideEffects: SideEffect): SideEffectsBuilder = SideEffectsBuilderImpl(dequeOf(*sideEffects))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy