W3cubDocs

/Kotlin

minOf

fun <T : Comparable<T>> minOf(a: T, b: T): T

Platform and version requirements: Kotlin 1.1

Returns the smaller of two values. If values are equal, returns the first one.

inline fun minOf(a: Byte, b: Byte): Byte

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Short, b: Short): Short

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Int, b: Int): Int

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Long, b: Long): Long

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Float, b: Float): Float

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Double, b: Double): Double

Platform and version requirements: Kotlin 1.1

Returns the smaller of two values.

fun <T : Comparable<T>> minOf(a: T, b: T, c: T): T

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Byte, b: Byte, c: Byte): Byte

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Short, b: Short, c: Short): Short

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Int, b: Int, c: Int): Int

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Long, b: Long, c: Long): Long

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Float, b: Float, c: Float): Float

Platform and version requirements: Kotlin 1.1

inline fun minOf(a: Double, b: Double, c: Double): Double

Platform and version requirements: Kotlin 1.1

Returns the smaller of three values.

fun <T> minOf(
    a: T, 
    b: T, 
    c: T, 
    comparator: Comparator<in T>
): T

Platform and version requirements: Kotlin 1.1, JVM

fun <T> minOf(
    a: T, 
    b: T, 
    c: T, 
    comparator: Comparator<in T>
): T

Platform and version requirements: Kotlin 1.1, JS

Returns the smaller of three values according to the order specified by the given comparator.

fun <T> minOf(a: T, b: T, comparator: Comparator<in T>): T

Platform and version requirements: Kotlin 1.1, JVM

fun <T> minOf(a: T, b: T, comparator: Comparator<in T>): T

Platform and version requirements: Kotlin 1.1, JS

Returns the smaller of two values according to the order specified by the given comparator. If values are equal, returns the first one.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.comparisons/min-of.html