Update standard library to 1.3 (#1915)
* Add Char.MIN_VALUE and Char.MAX_VALUE constants * Add Boolean companion object * Add SIZE_BYTES and SIZE_BITS
This commit is contained in:
@@ -21,6 +21,10 @@ package kotlin
|
||||
* represented as values of the primitive type `boolean`.
|
||||
*/
|
||||
public final class Boolean private constructor(private val value: kotlin.native.internal.BooleanValue) : Comparable<Boolean> {
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
companion object {}
|
||||
|
||||
/**
|
||||
* Returns the inverse of this boolean.
|
||||
*/
|
||||
|
||||
@@ -76,6 +76,29 @@ public final class Char private constructor(private val value: kotlin.native.int
|
||||
external public fun toDouble(): Double
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* The minimum value of a character code unit.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val MIN_VALUE: Char = '\u0000'
|
||||
|
||||
/**
|
||||
* The maximum value of a character code unit.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val MAX_VALUE: Char = '\uFFFF'
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent a Char in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BYTES: Int = 2
|
||||
/**
|
||||
* The number of bits used to represent a Char in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BITS: Int = 16
|
||||
|
||||
/**
|
||||
* The minimum value of a Unicode high-surrogate code unit.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,18 @@ public final class Byte private constructor(private val value: kotlin.native.int
|
||||
* A constant holding the maximum value an instance of Byte can have.
|
||||
*/
|
||||
public const val MAX_VALUE: Byte = 127
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent an instance of Byte in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BYTES: Int = 1
|
||||
|
||||
/**
|
||||
* The number of bits used to represent an instance of Byte in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BITS: Int = 8
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -247,6 +259,18 @@ public final class Short private constructor(private val value: kotlin.native.in
|
||||
* A constant holding the maximum value an instance of Short can have.
|
||||
*/
|
||||
public const val MAX_VALUE: Short = 32767
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent an instance of Short in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BYTES: Int = 2
|
||||
|
||||
/**
|
||||
* The number of bits used to represent an instance of Short in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BITS: Int = 16
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,6 +485,18 @@ public final class Int private constructor(private val value: kotlin.native.inte
|
||||
* A constant holding the maximum value an instance of Int can have.
|
||||
*/
|
||||
public const val MAX_VALUE: Int = 2147483647
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent an instance of Int in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BYTES: Int = 4
|
||||
|
||||
/**
|
||||
* The number of bits used to represent an instance of Int in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BITS: Int = 32
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -697,6 +733,18 @@ public final class Long private constructor(private val value: kotlin.native.int
|
||||
* A constant holding the maximum value an instance of Long can have.
|
||||
*/
|
||||
public const val MAX_VALUE: Long = 9223372036854775807L
|
||||
|
||||
/**
|
||||
* The number of bytes used to represent an instance of Long in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BYTES: Int = 8
|
||||
|
||||
/**
|
||||
* The number of bits used to represent an instance of Long in a binary form.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
public const val SIZE_BITS: Int = 64
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user