Triple
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:
import kotlin.test.*
fun main(args: Array<String>) {
//sampleStart
val (a, b, c) = Triple(2, "x", listOf(null))
println(a) // 2
println(b) // x
println(c) // [null]
//sampleEnd
}
Parameters
Constructors
<init>
Represents a triad of values
Triple
(
first
:
A
,
second
:
B
,
third
:
C
)
Properties
first
First value.
val
first
:
A
second
Second value.
val
second
:
B
third
Third value.
val
third
:
C