org.jetbrains.kotlinx.jupyter.api.libraries.VariablesSubstitutionAware.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-api Show documentation
Show all versions of kotlin-jupyter-api Show documentation
API for libraries supporting Kotlin Jupyter notebooks
package org.jetbrains.kotlinx.jupyter.api.libraries
/**
* [VariablesSubstitutionAware] provides interface for variables substitution.
*
* It is supposed that [T] implements `VariablesSubstitutionAware`
*
* If implementors don't have variables to be replaced, they may return `this`.
* Non-trivial implementations are supposed for classes representing text code
* snippets.
*/
interface VariablesSubstitutionAware {
/**
* Replace variables and return the result.
*
* @param mapping maps variables names to their values
* @return instance with substituted variables
*/
fun replaceVariables(mapping: Map): T
}