KotlinVersion

class KotlinVersion(val major: Int, val minor: Int, val patch: Int) : Comparable<KotlinVersion> (source)

Represents a version of the Kotlin standard library.

major, minor and patch are integer components of a version, they must be non-negative and not greater than 255 (MAX_COMPONENT_VALUE).

Since Kotlin

1.1

Constructors

Link copied to clipboard
fun KotlinVersion(major: Int, minor: Int)

Creates a version from major and minor components, leaving patch component zero.

Link copied to clipboard
fun KotlinVersion(major: Int, minor: Int, patch: Int)

Creates a version from all three components.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun compareTo(other: KotlinVersion): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isAtLeast(major: Int, minor: Int): Boolean

Returns true if this version is not less than the version specified with the provided major and minor components.

fun isAtLeast(major: Int, minor: Int, patch: Int): Boolean

Returns true if this version is not less than the version specified with the provided major, minor and patch components.

Link copied to clipboard
open override fun toString(): String

Returns the string representation of this version

Properties

Link copied to clipboard
val major: Int
Link copied to clipboard
val minor: Int
Link copied to clipboard
val patch: Int