
commonMain.arrow.core.Tuple8.kt Maven / Gradle / Ivy
@file:JvmMultifileClass
@file:JvmName("TupleNKt")
package arrow.core
import kotlin.jvm.JvmMultifileClass
import kotlin.jvm.JvmName
public data class Tuple8(
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 , B : Comparable, C : Comparable, D : Comparable, E : Comparable, F : Comparable, G : Comparable, H : Comparable>
Tuple8.compareTo(other: Tuple8): 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
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy