Incendo / Incendo/cloud

Kotlin Tuple.componentX() extensions

Open
#779 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
548
Forks
60
PR merge metrics
No merged PRs in 30d

Description

operator fun <U : Any?, V : Any?> Pair<U, V>.component1(): U = first()
operator fun <U : Any?, V : Any?> Pair<U, V>.component2(): V = second()

operator fun <U : Any?, V : Any?, W : Any?> Triplet<U, V, W>.component1(): U = first()
operator fun <U : Any?, V : Any?, W : Any?> Triplet<U, V, W>.component2(): V = second()
operator fun <U : Any?, V : Any?, W : Any?> Triplet<U, V, W>.component3(): W = third()

operator fun <U : Any?, V : Any?, W : Any?, X : Any?> Quartet<U, V, W, X>.component1(): U = first()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?> Quartet<U, V, W, X>.component2(): V = second()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?> Quartet<U, V, W, X>.component3(): W = third()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?> Quartet<U, V, W, X>.component4(): X = fourth()

operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?> Quintet<U, V, W, X, Y>.component1(): U = first()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?> Quintet<U, V, W, X, Y>.component2(): V = second()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?> Quintet<U, V, W, X, Y>.component3(): W = third()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?> Quintet<U, V, W, X, Y>.component4(): X = fourth()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?> Quintet<U, V, W, X, Y>.component5(): Y = fifth()

operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component1(): U = first()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component2(): V = second()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component3(): W = third()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component4(): X = fourth()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component5(): Y = fifth()
operator fun <U : Any?, V : Any?, W : Any?, X : Any?, Y : Any?, Z : Any?> Sextet<U, V, W, X, Y, Z>.component6(): Z = sixth()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the Kotlin module and the Pair, Triplet, Quartet, Quintet, and Sextet definitions or related extensions in the repository. Done means the requested component extensions are available for each tuple type and the relevant checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.