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

com.skillw.pouvoir.api.plugin.map.SingleExecMap.kt Maven / Gradle / Ivy

There is a newer version: 1.6.7-beta-6
Show newest version
package com.skillw.pouvoir.api.plugin.map

/**
 * Single exec map
 *
 * @constructor Create empty Single exec map
 */
open class SingleExecMap : LowerMap<() -> Unit>() {
    /** Invoke */
    fun invoke() {
        values.forEach { function -> function.invoke() }
    }

    /**
     * Run
     *
     * @param thing
     */
    open fun run(thing: String) {
        this[thing]?.run { invoke() }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy