Triple
data class Triple<out A, out B, out C>(first: A, second: B, third: C) : Serializable
Content copied to clipboard
Represents a triad of values
There is no meaning attached to values in this class, it can be used for any purpose. Triple exhibits value semantics, i.e. two triples are equal if all three components are equal. An example of decomposing it into values:
Samples
import samples.*
import kotlin.test.*
fun main() {
//sampleStart
val (a, b, c) = Triple(2, "x", listOf(null))
assertPrints(a, "2")
assertPrints(b, "x")
assertPrints(c, "[null]")
//sampleEnd
}
Parameters
A
type of the first value.
B
type of the second value.
C
type of the third value.