Last active
March 6, 2021 17:57
-
-
Save TEGRAXD/d6100c7e0ade5ff453e11f4e4984519d to your computer and use it in GitHub Desktop.
Pair And Title - Penta Kotlin Custom Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class Penta<out A, out B, out C, out D, out E> ( | |
| val first: A, | |
| val second: B, | |
| val third: C, | |
| val fourth: D, | |
| val fifth: E | |
| ) : Serializable { | |
| override fun toString(): String = "($first, $second, $third, $fourth, $fifth)" | |
| } | |
| fun <T> Penta<T, T, T, T, T>.toList(): List<T> = listOf(first, second, third, fourth, fifth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment