/
Tuple8.kt
49 lines (43 loc) · 1.45 KB
/
Tuple8.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@file:JvmMultifileClass
@file:JvmName("TupleNKt")
package arrow.core
import kotlin.jvm.JvmMultifileClass
import kotlin.jvm.JvmName
public data class Tuple8<out A, out B, out C, out D, out E, out F, out G, out H>(
val first: A,
val second: B,
val third: C,
val fourth: D,
val fifth: E,
val sixth: F,
val seventh: G,
val eighth: H
) {
override fun toString(): String =
"($first, $second, $third, $fourth, $fifth, $sixth, $seventh, $eighth)"
public companion object
}
public operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>, G : Comparable<G>, H : Comparable<H>>
Tuple8<A, B, C, D, E, F, G, H>.compareTo(other: Tuple8<A, B, C, D, E, F, G, H>): Int {
val first = first.compareTo(other.first)
return if (first == 0) {
val second = second.compareTo(other.second)
if (second == 0) {
val third = third.compareTo(other.third)
if (third == 0) {
val fourth = fourth.compareTo(other.fourth)
if (fourth == 0) {
val fifth = fifth.compareTo(other.fifth)
if (fifth == 0) {
val sixth = sixth.compareTo(other.sixth)
if (sixth == 0) {
val seventh = seventh.compareTo(other.seventh)
if (seventh == 0) eighth.compareTo(other.eighth)
else seventh
} else sixth
} else fifth
} else fourth
} else third
} else second
} else first
}