Package-level declarations

Core functions and types, available on all supported platforms.

Core functions and types, available on all supported platforms.

Core functions and types, available on all supported platforms.

Core functions and types, available on all supported platforms.

Types

Link copied to clipboard
interface Annotation

Base interface implicitly implemented by all annotation interfaces. See Kotlin language documentation for more information on annotations.

Since Kotlin 1.0
Link copied to clipboard
open class Any

The root of the Kotlin class hierarchy. Every Kotlin class has Any as a superclass.

Since Kotlin 1.0
Link copied to clipboard
class Array<T>

Represents an array (specifically, a Java array when targeting the JVM platform). Array instances can be created using the arrayOf, arrayOfNulls and emptyArray standard library functions. See Kotlin language documentation for more information on arrays.

Since Kotlin 1.0
Link copied to clipboard
expect open class AssertionError : Error
Since Kotlin 1.0
actual open class AssertionError(val message: String?, val cause: Throwable?) : Error
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard

Represents a value which is either true or false. On the JVM, non-nullable values of this type are represented as values of the primitive type boolean.

Since Kotlin 1.0
Link copied to clipboard
class BooleanArray(size: Int)

An array of booleans. When targeting the JVM, instances of this class are represented as boolean[].

Since Kotlin 1.0
Link copied to clipboard

Represents a 8-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type byte.

Since Kotlin 1.0
Link copied to clipboard
class ByteArray(size: Int)

An array of bytes. When targeting the JVM, instances of this class are represented as byte[].

Since Kotlin 1.0
Link copied to clipboard
class Char : Comparable<Char>

Represents a 16-bit Unicode character.

Since Kotlin 1.0
Link copied to clipboard
class CharArray(size: Int)

An array of chars. When targeting the JVM, instances of this class are represented as char[].

Since Kotlin 1.0
Link copied to clipboard
interface CharSequence

Represents a readable sequence of Char values.

Since Kotlin 1.0
Link copied to clipboard
expect open class ClassCastException(val message: String?) : RuntimeException
Since Kotlin 1.0
actual open class ClassCastException(val message: String?) : RuntimeException
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard
interface Comparable<in T>

Classes which inherit from this interface have a defined total ordering between their instances.

Since Kotlin 1.0
Link copied to clipboard
expect fun interface Comparator<T>

Provides a comparison function for imposing a total ordering between instances of the type T.

Since Kotlin 1.0
actual fun interface Comparator<T>
Since Kotlin 1.1
actual typealias Comparator<T> = java.util.Comparator<T>
Since Kotlin 1.1
Link copied to clipboard
expect open class ConcurrentModificationException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class ConcurrentModificationException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.TYPE])
annotation class ContextFunctionTypeParams(val count: Int)
Since Kotlin 1.0
Link copied to clipboard

Marks the annotated declaration as deprecated.

Since Kotlin 1.0
Link copied to clipboard

Possible levels of a deprecation. The level specifies how the deprecated element usages are reported in code.

Since Kotlin 1.0
Link copied to clipboard

Represents a double-precision 64-bit IEEE 754 floating point number. On the JVM, non-nullable values of this type are represented as values of the primitive type double.

Since Kotlin 1.0
Link copied to clipboard
class DoubleArray(size: Int)

An array of doubles. When targeting the JVM, instances of this class are represented as double[].

Since Kotlin 1.0
Link copied to clipboard
annotation class DslMarker

When applied to annotation class X specifies that X defines a DSL language

Since Kotlin 1.1
Link copied to clipboard
abstract class Enum<E : Enum<E>>(name: String, ordinal: Int) : Comparable<E>

The common base class of all enum classes. See the Kotlin language documentation for more information on enum classes.

Since Kotlin 1.0
Link copied to clipboard
expect open class Error(val message: String?, val cause: Throwable?) : Throwable
Since Kotlin 1.0
actual open class Error(val message: String?, val cause: Throwable?) : Throwable
Since Kotlin 1.1
actual typealias Error = java.lang.Error
Since Kotlin 1.1
Link copied to clipboard
expect open class Exception(val message: String?, val cause: Throwable?) : Throwable
Since Kotlin 1.0
actual open class Exception(val message: String?, val cause: Throwable?) : Throwable
Since Kotlin 1.1
actual typealias Exception = java.lang.Exception
Since Kotlin 1.1
Link copied to clipboard
annotation class Experimental(val level: Experimental.Level = Level.ERROR)

Signals that the annotated annotation class is a marker of an experimental API.

Since Kotlin 1.2
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.TYPE])
annotation class ExtensionFunctionType

Signifies that the annotated functional type represents an extension function.

Since Kotlin 1.0
Link copied to clipboard

Represents a single-precision 32-bit IEEE 754 floating point number. On the JVM, non-nullable values of this type are represented as values of the primitive type float.

Since Kotlin 1.0
Link copied to clipboard
class FloatArray(size: Int)

An array of floats. When targeting the JVM, instances of this class are represented as float[].

Since Kotlin 1.0
Link copied to clipboard
interface Function<out R>

Represents a value of a functional type, such as a lambda, an anonymous function or a function reference.

Since Kotlin 1.0
Link copied to clipboard
expect open class IllegalArgumentException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class IllegalArgumentException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard
expect open class IllegalStateException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class IllegalStateException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard
expect open class IndexOutOfBoundsException(val message: String?) : RuntimeException
Since Kotlin 1.0
actual open class IndexOutOfBoundsException(val message: String?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard

Represents a 32-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type int.

Since Kotlin 1.0
Link copied to clipboard
class IntArray(size: Int)

An array of ints. When targeting the JVM, instances of this class are represented as int[].

Since Kotlin 1.0
Link copied to clipboard
class KotlinVersion(val major: Int, val minor: Int, val patch: Int) : Comparable<KotlinVersion>

Represents a version of the Kotlin standard library.

Since Kotlin 1.1
Link copied to clipboard
interface Lazy<out T>

Represents a value with lazy initialization.

Since Kotlin 1.0
Link copied to clipboard

Specifies how a Lazy instance synchronizes initialization among multiple threads.

Since Kotlin 1.0
Link copied to clipboard

Represents a 64-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type long.

Since Kotlin 1.0
Link copied to clipboard
class LongArray(size: Int)

An array of longs. When targeting the JVM, instances of this class are represented as long[].

Since Kotlin 1.0
Link copied to clipboard
expect open class NoSuchElementException(val message: String?) : RuntimeException
Since Kotlin 1.0
actual open class NoSuchElementException(val message: String?) : RuntimeException
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard
class Nothing

Nothing has no instances. You can use Nothing to represent "a value that never exists": for example, if a function has the return type of Nothing, it means that it never returns (always throws an exception).

Since Kotlin 1.0
Link copied to clipboard
class NotImplementedError(val message: String = "An operation is not implemented.") : Error

An exception is thrown to indicate that a method body remains to be implemented.

Since Kotlin 1.0
Link copied to clipboard
expect open class NoWhenBranchMatchedException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class NoWhenBranchMatchedException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard
expect open class NullPointerException(val message: String?) : RuntimeException
Since Kotlin 1.0
actual open class NullPointerException(val message: String?) : RuntimeException
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard
abstract class Number

Superclass for all platform classes representing numeric values.

Since Kotlin 1.0
Link copied to clipboard
expect open class NumberFormatException(val message: String?) : IllegalArgumentException
Since Kotlin 1.0
actual open class NumberFormatException(val message: String?) : IllegalArgumentException
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard

Marks an expected annotation class that it isn't required to have actual counterparts in all platforms.

Since Kotlin 1.0
Link copied to clipboard
data class Pair<out A, out B>(val first: A, val second: B) : Serializable

Represents a generic pair of two values.

Since Kotlin 1.0
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.TYPE])
annotation class ParameterName(val name: String)

Annotates type arguments of functional type and holds corresponding parameter name specified by the user in type declaration (if any).

Since Kotlin 1.1
Link copied to clipboard

When applied to a class or a member with internal visibility allows to use it from public inline functions and makes it effectively public.

Since Kotlin 1.1
Link copied to clipboard
@Target(allowedTargets = [])
annotation class ReplaceWith(val expression: String, val imports: String)

Specifies a code fragment that can be used to replace a deprecated function, property or class. Tools such as IDEs can automatically apply the replacements specified through this annotation.

Since Kotlin 1.0
Link copied to clipboard
expect open class RuntimeException(val message: String?, val cause: Throwable?) : Exception
Since Kotlin 1.0
actual open class RuntimeException(val message: String?, val cause: Throwable?) : Exception
Since Kotlin 1.1
Since Kotlin 1.1
Link copied to clipboard

Represents a 16-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type short.

Since Kotlin 1.0
Link copied to clipboard
class ShortArray(size: Int)

An array of shorts. When targeting the JVM, instances of this class are represented as short[].

Since Kotlin 1.0
Link copied to clipboard

Specifies the first version of Kotlin where a declaration has appeared. Using the declaration and specifying an older API version (via the -api-version command line option) will result in an error.

Since Kotlin 1.0
Link copied to clipboard

The String class represents character strings. All string literals in Kotlin programs, such as "abc", are implemented as instances of this class.

Since Kotlin 1.0
Link copied to clipboard
open class Throwable(val message: String?, val cause: Throwable?)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin 1.0
Link copied to clipboard
data class Triple<out A, out B, out C>(val first: A, val second: B, val third: C) : Serializable

Represents a triad of values

Since Kotlin 1.0
Link copied to clipboard
expect class UninitializedPropertyAccessException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class UninitializedPropertyAccessException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard
object Unit

The type with only one value: the Unit object. This type corresponds to the void type in Java.

Since Kotlin 1.0
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.TYPE])
annotation class UnsafeVariance

Suppresses errors about variance conflict

Since Kotlin 1.0
Link copied to clipboard
expect open class UnsupportedOperationException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.0
actual open class UnsupportedOperationException(val message: String?, val cause: Throwable?) : RuntimeException
Since Kotlin 1.1
Link copied to clipboard

Allows to use experimental API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with UseExperimental, its usages are not required to opt-in to that experimental API.

Since Kotlin 1.2

Properties

Link copied to clipboard

Returns true if this lateinit property has been assigned a value, and false otherwise.

Since Kotlin 1.2
Link copied to clipboard

Returns an array of stack trace elements representing the stack trace pertaining to this throwable.

Since Kotlin 1.0

Functions

Link copied to clipboard
actual fun Throwable.addSuppressed(exception: Throwable)

When supported by the platform, adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.1
Link copied to clipboard
inline fun <T> T.also(block: (T) -> Unit): T

Calls the specified function block with this value as its argument and returns this value.

Since Kotlin 1.1
Link copied to clipboard
infix inline fun BigInteger.and(other: BigInteger): BigInteger

Performs a bitwise AND operation between the two values.

Since Kotlin 1.2
Link copied to clipboard
inline fun <T> T.apply(block: T.() -> Unit): T

Calls the specified function block with this value as its receiver and returns this value.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T> arrayOf(vararg elements: T): Array<T>

Returns an array containing the specified elements.

Since Kotlin 1.0
fun <T> arrayOf(vararg elements: T): Array<T>
Since Kotlin 1.1
Link copied to clipboard
fun <T> arrayOfNulls(size: Int): Array<T?>

Returns an array of objects of the given type with the given size, initialized with null values.

Since Kotlin 1.0
Link copied to clipboard
inline fun assert(value: Boolean)

Throws an AssertionError if the value is false and runtime assertions have been enabled on the JVM using the -ea JVM option.

Since Kotlin 1.0
inline fun assert(value: Boolean, lazyMessage: () -> Any)

Throws an AssertionError calculated by lazyMessage if the value is false and runtime assertions have been enabled on the JVM using the -ea JVM option.

Since Kotlin 1.0
Link copied to clipboard
fun booleanArrayOf(vararg elements: Boolean): BooleanArray

Returns an array containing the specified boolean values.

Since Kotlin 1.0
fun booleanArrayOf(vararg elements: Boolean): BooleanArray
Since Kotlin 1.1
Link copied to clipboard
fun byteArrayOf(vararg elements: Byte): ByteArray

Returns an array containing the specified Byte numbers.

Since Kotlin 1.0
fun byteArrayOf(vararg elements: Byte): ByteArray
Since Kotlin 1.1
Link copied to clipboard
fun charArrayOf(vararg elements: Char): CharArray

Returns an array containing the specified characters.

Since Kotlin 1.0
fun charArrayOf(vararg elements: Char): CharArray
Since Kotlin 1.1
Link copied to clipboard
inline fun check(value: Boolean)

Throws an IllegalStateException if the value is false.

Since Kotlin 1.0
inline fun check(value: Boolean, lazyMessage: () -> Any)

Throws an IllegalStateException with the result of calling lazyMessage if the value is false.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T : Any> checkNotNull(value: T?): T

Throws an IllegalStateException if the value is null. Otherwise returns the not null value.

Since Kotlin 1.0
inline fun <T : Any> checkNotNull(value: T?, lazyMessage: () -> Any): T

Throws an IllegalStateException with the result of calling lazyMessage if the value is null. Otherwise returns the not null value.

Since Kotlin 1.0
Link copied to clipboard
inline operator fun BigDecimal.dec(): BigDecimal

Enables the use of the unary -- operator for BigDecimal instances.

Since Kotlin 1.2
inline operator fun BigInteger.dec(): BigInteger

Enables the use of the -- operator for BigInteger instances.

Since Kotlin 1.2
Link copied to clipboard
inline operator fun BigDecimal.div(other: BigDecimal): BigDecimal

Enables the use of the / operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.div(other: BigInteger): BigInteger

Enables the use of the / operator for BigInteger instances.

Since Kotlin 1.0
Link copied to clipboard
fun doubleArrayOf(vararg elements: Double): DoubleArray

Returns an array containing the specified Double numbers.

Since Kotlin 1.0
fun doubleArrayOf(vararg elements: Double): DoubleArray
Since Kotlin 1.1
Link copied to clipboard
inline fun <T> emptyArray(): Array<T>

Returns an empty array of the specified type T.

Since Kotlin 1.0
inline fun <T> emptyArray(): Array<T>

Returns an empty array of the specified type T.

Since Kotlin 1.1
Link copied to clipboard
inline fun <T : Enum<T>> enumValueOf(name: String): T

Returns an enum entry with specified name.

Since Kotlin 1.1
Link copied to clipboard
inline fun <T : Enum<T>> enumValues(): Array<T>

Returns an array containing enum T entries.

Since Kotlin 1.1
Link copied to clipboard
inline fun error(message: Any): Nothing

Throws an IllegalStateException with the given message.

Since Kotlin 1.0
Link copied to clipboard
fun floatArrayOf(vararg elements: Float): FloatArray

Returns an array containing the specified Float numbers.

Since Kotlin 1.0
fun floatArrayOf(vararg elements: Float): FloatArray
Since Kotlin 1.1
Link copied to clipboard

Returns the Double value corresponding to a given bit representation.

Since Kotlin 1.2
expect fun Float.Companion.fromBits(bits: Int): Float

Returns the Float value corresponding to a given bit representation.

Since Kotlin 1.2
actual inline fun Double.Companion.fromBits(bits: Long): Double

Returns the Double value corresponding to a given bit representation.

Since Kotlin 1.2
actual inline fun Float.Companion.fromBits(bits: Int): Float

Returns the Float value corresponding to a given bit representation.

Since Kotlin 1.2
actual inline fun Double.Companion.fromBits(bits: Long): Double

Returns the Double value corresponding to a given bit representation.

Since Kotlin 1.2
actual inline fun Float.Companion.fromBits(bits: Int): Float

Returns the Float value corresponding to a given bit representation.

Since Kotlin 1.2
Link copied to clipboard
inline operator fun <T> Lazy<T>.getValue(thisRef: Any?, property: KProperty<*>): T

An extension to delegate a read-only property of type T to an instance of Lazy.

Since Kotlin 1.0
Link copied to clipboard
inline operator fun BigDecimal.inc(): BigDecimal

Enables the use of the unary ++ operator for BigDecimal instances.

Since Kotlin 1.2
inline operator fun BigInteger.inc(): BigInteger

Enables the use of the ++ operator for BigInteger instances.

Since Kotlin 1.2
Link copied to clipboard
fun intArrayOf(vararg elements: Int): IntArray

Returns an array containing the specified Int numbers.

Since Kotlin 1.0
fun intArrayOf(vararg elements: Int): IntArray
Since Kotlin 1.1
Link copied to clipboard
inline fun BigInteger.inv(): BigInteger

Inverts the bits including the sign bit in this value.

Since Kotlin 1.2
Link copied to clipboard
expect fun Double.isFinite(): Boolean
expect fun Float.isFinite(): Boolean
Since Kotlin 1.0
actual fun Double.isFinite(): Boolean
actual fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.1
actual inline fun Double.isFinite(): Boolean
actual inline fun Float.isFinite(): Boolean

Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).

Since Kotlin 1.0
Link copied to clipboard
expect fun Double.isInfinite(): Boolean
expect fun Float.isInfinite(): Boolean
Since Kotlin 1.0
actual fun Double.isInfinite(): Boolean
actual fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.1
actual inline fun Double.isInfinite(): Boolean
actual inline fun Float.isInfinite(): Boolean

Returns true if this value is infinitely large in magnitude.

Since Kotlin 1.0
Link copied to clipboard
expect fun Double.isNaN(): Boolean
expect fun Float.isNaN(): Boolean
Since Kotlin 1.0
actual fun Double.isNaN(): Boolean
actual fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.1
actual inline fun Double.isNaN(): Boolean
actual inline fun Float.isNaN(): Boolean

Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

Since Kotlin 1.0
Link copied to clipboard
expect fun <T> lazy(initializer: () -> T): Lazy<T>
Since Kotlin 1.0
expect fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T>
expect fun <T> lazy(mode: LazyThreadSafetyMode, initializer: () -> T): Lazy<T>

Creates a new instance of the Lazy that uses the specified initialization function initializer.

Since Kotlin 1.0
actual fun <T> lazy(initializer: () -> T): Lazy<T>
actual fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T>
actual fun <T> lazy(mode: LazyThreadSafetyMode, initializer: () -> T): Lazy<T>

Creates a new instance of the Lazy that uses the specified initialization function initializer.

Since Kotlin 1.1
actual fun <T> lazy(initializer: () -> T): Lazy<T>
actual fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T>

Creates a new instance of the Lazy that uses the specified initialization function initializer and the default thread-safety mode LazyThreadSafetyMode.SYNCHRONIZED.

Since Kotlin 1.0
actual fun <T> lazy(mode: LazyThreadSafetyMode, initializer: () -> T): Lazy<T>

Creates a new instance of the Lazy that uses the specified initialization function initializer and thread-safety mode.

Since Kotlin 1.0
Link copied to clipboard
fun <T> lazyOf(value: T): Lazy<T>

Creates a new instance of the Lazy that is already initialized with the specified value.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T, R> T.let(block: (T) -> R): R

Calls the specified function block with this value as its argument and returns its result.

Since Kotlin 1.0
Link copied to clipboard
fun longArrayOf(vararg elements: Long): LongArray

Returns an array containing the specified Long numbers.

Since Kotlin 1.0
fun longArrayOf(vararg elements: Long): LongArray
Since Kotlin 1.1
Link copied to clipboard
inline operator fun BigDecimal.minus(other: BigDecimal): BigDecimal

Enables the use of the - operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.minus(other: BigInteger): BigInteger

Enables the use of the - operator for BigInteger instances.

Since Kotlin 1.0
Link copied to clipboard
infix inline fun BigInteger.or(other: BigInteger): BigInteger

Performs a bitwise OR operation between the two values.

Since Kotlin 1.2
Link copied to clipboard
operator fun String?.plus(other: Any?): String

Concatenates this string with the string representation of the given other object. If either the receiver or the other object are null, they are represented as the string "null".

Since Kotlin 1.0
inline operator fun BigDecimal.plus(other: BigDecimal): BigDecimal

Enables the use of the + operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.plus(other: BigInteger): BigInteger

Enables the use of the + operator for BigInteger instances.

Since Kotlin 1.0
Link copied to clipboard
actual inline fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard error output.

Since Kotlin 1.0

Prints the detailed description of this throwable to the specified stream.

Since Kotlin 1.0

Prints the detailed description of this throwable to the specified writer.

Since Kotlin 1.0
Link copied to clipboard
inline operator fun BigDecimal.rem(other: BigDecimal): BigDecimal

Enables the use of the % operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.rem(other: BigInteger): BigInteger

Enables the use of the % operator for BigInteger instances.

Since Kotlin 1.1
Link copied to clipboard
inline fun repeat(times: Int, action: (Int) -> Unit)

Executes the given function action specified number of times.

Since Kotlin 1.0
Link copied to clipboard
inline fun require(value: Boolean)

Throws an IllegalArgumentException if the value is false.

Since Kotlin 1.0
inline fun require(value: Boolean, lazyMessage: () -> Any)

Throws an IllegalArgumentException with the result of calling lazyMessage if the value is false.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T : Any> requireNotNull(value: T?): T

Throws an IllegalArgumentException if the value is null. Otherwise returns the not null value.

Since Kotlin 1.0
inline fun <T : Any> requireNotNull(value: T?, lazyMessage: () -> Any): T

Throws an IllegalArgumentException with the result of calling lazyMessage if the value is null. Otherwise returns the not null value.

Since Kotlin 1.0
Link copied to clipboard
inline fun <R> run(block: () -> R): R

Calls the specified function block and returns its result.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T, R> T.run(block: T.() -> R): R

Calls the specified function block with this value as its receiver and returns its result.

Since Kotlin 1.0
Link copied to clipboard
infix inline fun BigInteger.shl(n: Int): BigInteger

Shifts this value left by the n number of bits.

Since Kotlin 1.2
Link copied to clipboard
fun shortArrayOf(vararg elements: Short): ShortArray

Returns an array containing the specified Short numbers.

Since Kotlin 1.0
fun shortArrayOf(vararg elements: Short): ShortArray
Since Kotlin 1.1
Link copied to clipboard
infix inline fun BigInteger.shr(n: Int): BigInteger

Shifts this value right by the n number of bits, filling the leftmost bits with copies of the sign bit.

Since Kotlin 1.2
Link copied to clipboard
inline fun <R> suspend(noinline block: suspend () -> R): suspend () -> R
Since Kotlin 1.2
Link copied to clipboard
inline fun <R> synchronized(lock: Any, block: () -> R): R
Since Kotlin 1.1
inline fun <R> synchronized(lock: Any, block: () -> R): R

Executes the given function block while holding the monitor of the given object lock.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T> T.takeIf(predicate: (T) -> Boolean): T?

Returns this value if it satisfies the given predicate or null, if it doesn't.

Since Kotlin 1.1
Link copied to clipboard
inline fun <T> T.takeUnless(predicate: (T) -> Boolean): T?

Returns this value if it does not satisfy the given predicate or null, if it does.

Since Kotlin 1.1
Link copied to clipboard
inline operator fun BigDecimal.times(other: BigDecimal): BigDecimal

Enables the use of the * operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.times(other: BigInteger): BigInteger

Enables the use of the * operator for BigInteger instances.

Since Kotlin 1.0
Link copied to clipboard
infix fun <A, B> A.to(that: B): Pair<A, B>

Creates a tuple of type Pair from this and that.

Since Kotlin 1.0
Link copied to clipboard

Returns the value of this BigInteger number as a BigDecimal.

Since Kotlin 1.2
inline fun Double.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Double number as a BigDecimal.

Since Kotlin 1.2
inline fun Float.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Float number as a BigDecimal.

Since Kotlin 1.2
inline fun Int.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Int number as a BigDecimal.

Since Kotlin 1.2
inline fun Long.toBigDecimal(mathContext: MathContext): BigDecimal

Returns the value of this Long number as a BigDecimal.

Since Kotlin 1.2
inline fun BigInteger.toBigDecimal(scale: Int = 0, mathContext: MathContext = MathContext.UNLIMITED): BigDecimal

Returns the value of this BigInteger number as a BigDecimal scaled according to the specified scale and rounded according to the settings specified with mathContext.

Since Kotlin 1.2
Link copied to clipboard

Returns the value of this Int number as a BigInteger.

Since Kotlin 1.2

Returns the value of this Long number as a BigInteger.

Since Kotlin 1.2
Link copied to clipboard
expect fun Double.toBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout.

Since Kotlin 1.2
expect fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
actual fun Double.toBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout.

Since Kotlin 1.2
actual fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
actual inline fun Double.toBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout.

Since Kotlin 1.2
actual inline fun Float.toBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout.

Since Kotlin 1.2
Link copied to clipboard
inline fun TODO(): Nothing
inline fun TODO(reason: String): Nothing

Always throws NotImplementedError stating that operation is not implemented.

Since Kotlin 1.0
Link copied to clipboard
fun <T> Pair<T, T>.toList(): List<T>

Converts this pair into a list.

Since Kotlin 1.0
fun <T> Triple<T, T, T>.toList(): List<T>

Converts this triple into a list.

Since Kotlin 1.0
Link copied to clipboard
expect fun Double.toRawBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
expect fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual fun Double.toRawBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual inline fun Double.toRawBits(): Long

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
actual inline fun Float.toRawBits(): Int

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin 1.2
Link copied to clipboard

Returns a string representation of the object. Can be called with a null receiver, in which case it returns the string "null".

Since Kotlin 1.0
Link copied to clipboard
inline operator fun BigDecimal.unaryMinus(): BigDecimal

Enables the use of the unary - operator for BigDecimal instances.

Since Kotlin 1.0
inline operator fun BigInteger.unaryMinus(): BigInteger

Enables the use of the unary - operator for BigInteger instances.

Since Kotlin 1.0
Link copied to clipboard
inline fun <T : AutoCloseable?, R> T.use(block: (T) -> R): R

Executes the given block function on this resource and then closes it down correctly whether an exception is thrown or not.

Since Kotlin 1.2
Link copied to clipboard
inline fun <T, R> with(receiver: T, block: T.() -> R): R

Calls the specified function block with the given receiver as its receiver and returns its result.

Since Kotlin 1.0
Link copied to clipboard
infix inline fun BigInteger.xor(other: BigInteger): BigInteger

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.2