All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.jakta.agents.bdi.intentions.IntentionPool.kt Maven / Gradle / Ivy

There is a newer version: 0.11.102
Show newest version
package it.unibo.jakta.agents.bdi.intentions

import it.unibo.jakta.agents.bdi.intentions.impl.IntentionPoolImpl

interface IntentionPool : Map {
    fun updateIntention(intention: Intention): IntentionPool

    fun nextIntention(): Intention

    fun pop(): IntentionPool

    fun deleteIntention(intentionID: IntentionID): IntentionPool

    companion object {
        fun empty(): IntentionPool = IntentionPoolImpl()

        fun of(intentions: Map): IntentionPool = IntentionPoolImpl(intentions)
        fun of(vararg intentions: Intention): IntentionPool = of(intentions.asList())
        fun of(intentions: List): IntentionPool = IntentionPoolImpl(intentions.associateBy { it.id })
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy