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

org.jetbrains.kotlinx.jupyter.api.libraries.LibraryReference.kt Maven / Gradle / Ivy

There is a newer version: 0.12.0-335
Show newest version
package org.jetbrains.kotlinx.jupyter.api.libraries

data class LibraryReference(
    val info: LibraryResolutionInfo,
    val name: String? = null,
) : LibraryCacheable by info {
    val key: String

    init {
        val namePart = if (name.isNullOrEmpty()) "" else "${name}_"
        key = namePart + info.key
    }

    override fun toString(): String {
        val namePart = name ?: ""
        val infoPart = info.toString()
        return if (infoPart.isEmpty()) {
            namePart
        } else {
            "$namePart@$infoPart"
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy