-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from robstoll/feature/tuple-factory-method
introduce tuple factories; check in tests same instance
- Loading branch information
Showing
32 changed files
with
2,295 additions
and
584 deletions.
There are no files selected for viewing
This file contains 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
131 changes: 131 additions & 0 deletions
131
src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleFactory.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// automatically generated, don't modify here but in: | ||
// gradle/code-generation/src/main/kotlin/code-generation.generate.gradle.kts | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
@file:Suppress("MethodOverloading", "FunctionName") | ||
package ch.tutteli.kbox | ||
|
||
/** | ||
* Factory method to create a [Pair]. | ||
* | ||
* Alternative to `Pair(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Pair] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
fun <A1, A2> Tuple( | ||
a1: A1, a2: A2 | ||
): Pair<A1, A2> = | ||
Pair(a1, a2) | ||
|
||
/** | ||
* Factory method to create a [Triple]. | ||
* | ||
* Alternative to `Triple(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Triple] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
fun <A1, A2, A3> Tuple( | ||
a1: A1, a2: A2, a3: A3 | ||
): Triple<A1, A2, A3> = | ||
Triple(a1, a2, a3) | ||
|
||
/** | ||
* Factory method to create a [Tuple4]. | ||
* | ||
* Alternative to `Tuple4(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple4] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
fun <A1, A2, A3, A4> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4 | ||
): Tuple4<A1, A2, A3, A4> = | ||
Tuple4(a1, a2, a3, a4) | ||
|
||
/** | ||
* Factory method to create a [Tuple5]. | ||
* | ||
* Alternative to `Tuple5(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple5] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
fun <A1, A2, A3, A4, A5> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4, a5: A5 | ||
): Tuple5<A1, A2, A3, A4, A5> = | ||
Tuple5(a1, a2, a3, a4, a5) | ||
|
||
/** | ||
* Factory method to create a [Tuple6]. | ||
* | ||
* Alternative to `Tuple6(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple6] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
@Suppress("LongParameterList") | ||
fun <A1, A2, A3, A4, A5, A6> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6 | ||
): Tuple6<A1, A2, A3, A4, A5, A6> = | ||
Tuple6(a1, a2, a3, a4, a5, a6) | ||
|
||
/** | ||
* Factory method to create a [Tuple7]. | ||
* | ||
* Alternative to `Tuple7(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple7] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
@Suppress("LongParameterList") | ||
fun <A1, A2, A3, A4, A5, A6, A7> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7 | ||
): Tuple7<A1, A2, A3, A4, A5, A6, A7> = | ||
Tuple7(a1, a2, a3, a4, a5, a6, a7) | ||
|
||
/** | ||
* Factory method to create a [Tuple8]. | ||
* | ||
* Alternative to `Tuple8(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple8] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
@Suppress("LongParameterList") | ||
fun <A1, A2, A3, A4, A5, A6, A7, A8> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8 | ||
): Tuple8<A1, A2, A3, A4, A5, A6, A7, A8> = | ||
Tuple8(a1, a2, a3, a4, a5, a6, a7, a8) | ||
|
||
/** | ||
* Factory method to create a [Tuple9]. | ||
* | ||
* Alternative to `Tuple9(...)` with the advantage that you can add remove | ||
* arguments without the need to change function name. | ||
* | ||
* @return the newly created [Tuple9] | ||
* | ||
* @since 2.1.0 | ||
*/ | ||
@Suppress("LongParameterList") | ||
fun <A1, A2, A3, A4, A5, A6, A7, A8, A9> Tuple( | ||
a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8, a9: A9 | ||
): Tuple9<A1, A2, A3, A4, A5, A6, A7, A8, A9> = | ||
Tuple9(a1, a2, a3, a4, a5, a6, a7, a8, a9) | ||
|
Oops, something went wrong.