# PairKt

Added in 1.1.0

*** ** * ** ***


```
public final class PairKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull F` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(android.util.Pair).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Pair.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver)` Returns the first component of the pair. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull F` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(androidx.core.util.Pair).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Pair<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver)` Returns the first component of the pair. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull S` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(android.util.Pair).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Pair.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver)` Returns the second component of the pair. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull S` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(androidx.core.util.Pair).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Pair<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver)` Returns the second component of the pair. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Pair.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S>` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(kotlin.Pair).toAndroidPair()( @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver )` Returns this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html` as an `https://developer.android.com/reference/android/util/Pair.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Pair<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S>` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(kotlin.Pair).toAndroidXPair()( @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver )` Returns this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html` as an `https://developer.android.com/reference/androidx/core/util/Pair`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S>` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(android.util.Pair).toKotlinPair()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Pair.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver )` Returns this `https://developer.android.com/reference/android/util/Pair.html` as a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S>` | `<F extends https://developer.android.com/reference/java/lang/Object.html, S extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/core/util/PairKt#(androidx.core.util.Pair).toKotlinPair()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Pair<@https://developer.android.com/reference/androidx/annotation/NonNull F, @https://developer.android.com/reference/androidx/annotation/NonNull S> receiver )` Returns this `https://developer.android.com/reference/androidx/core/util/Pair` as a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html`. |

## Public methods

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull F <F extends Object, S extends Object> component1(@NonNull Pair<@NonNull F, @NonNull S> receiver)
```

Returns the first component of the pair.

This method allows to use destructuring declarations when working with pairs, for example:

```
val (first, second) = myPair
```

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:component1) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public static final @NonNull F <F extends Object, S extends Object> component1(@NonNull Pair<@NonNull F, @NonNull S> receiver)
```

Returns the first component of the pair.

This method allows to use destructuring declarations when working with pairs, for example:

```
val (first, second) = myPair
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull S <F extends Object, S extends Object> component2(@NonNull Pair<@NonNull F, @NonNull S> receiver)
```

Returns the second component of the pair.

This method allows to use destructuring declarations when working with pairs, for example:

```
val (first, second) = myPair
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:component2) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public static final @NonNull S <F extends Object, S extends Object> component2(@NonNull Pair<@NonNull F, @NonNull S> receiver)
```

Returns the second component of the pair.

This method allows to use destructuring declarations when working with pairs, for example:

```
val (first, second) = myPair
```

### toAndroidPair

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:toAndroidPair)

```
public static final @NonNull Pair<@NonNull F, @NonNull S> <F extends Object, S extends Object> toAndroidPair(
    @NonNull Pair<@NonNull F, @NonNull S> receiver
)
```

Returns this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html` as an `https://developer.android.com/reference/android/util/Pair.html`.

### toAndroidXPair

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:toAndroidXPair)

```
public static final @NonNull Pair<@NonNull F, @NonNull S> <F extends Object, S extends Object> toAndroidXPair(
    @NonNull Pair<@NonNull F, @NonNull S> receiver
)
```

Returns this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html` as an `https://developer.android.com/reference/androidx/core/util/Pair`.

### toKotlinPair

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:toKotlinPair) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Pair<@NonNull F, @NonNull S> <F extends Object, S extends Object> toKotlinPair(
    @NonNull Pair<@NonNull F, @NonNull S> receiver
)
```

Returns this `https://developer.android.com/reference/android/util/Pair.html` as a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html`.

### toKotlinPair

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Pair.kt+function:toKotlinPair) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
public static final @NonNull Pair<@NonNull F, @NonNull S> <F extends Object, S extends Object> toKotlinPair(
    @NonNull Pair<@NonNull F, @NonNull S> receiver
)
```

Returns this `https://developer.android.com/reference/androidx/core/util/Pair` as a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html`.