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

domain.PlatformVersion.kt Maven / Gradle / Ivy

There is a newer version: 1.1.0-a3
Show newest version
package co.touchlab.faktory.domain

internal class PlatformVersion private constructor(private val value: String) {

    val name get() = value

    internal companion object {
        internal fun of(version: String): PlatformVersion? =
            version.takeIf(String::isNotBlank)?.let(::PlatformVersion)
    }

    override fun equals(other: Any?): Boolean = value == (other as? PlatformVersion)?.value

    override fun hashCode(): Int = value.hashCode()

    override fun toString() = "PlatformVersion(name='$name')"

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy