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

domain.SwiftToolVersion.kt Maven / Gradle / Ivy

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

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

    val name get() = value

    internal companion object {
        internal const val Default = "5.3"

        internal fun of(version: String): SwiftToolVersion? =
            version.takeIf(String::isNotBlank)?.let(::SwiftToolVersion)
    }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy