KotlinVersion

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

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

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

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

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

Creates a version from all three components.

Types

Companion
Link copied to clipboard
Common
object Companion

Functions

compareTo
Link copied to clipboard
Common
open operator override fun compareTo(other: KotlinVersion): Int
equals
Link copied to clipboard
Common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
Common
open override fun hashCode(): Int
isAtLeast
Link copied to clipboard
Common
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.

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

Returns the string representation of this version

Properties

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