# LongLongPair

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/LongLongPair.kt+class:androidx.collection.LongLongPair) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  class LongLongPair
  ```

*** ** * ** ***

Container to ease passing around a tuple of two `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` values.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#LongLongPair(kotlin.Long,kotlin.Long)(first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` | Cmn |

| ### Public functions |
|---|---|---|
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#component1()()` Returns the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#first()` component of the pair. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#component2()()` Returns the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#second()` component of the pair. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Checks the two values for equality. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#hashCode()()` Compute a hash code using the hash codes of the underlying values | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#first()` the first value in the pair | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#second()` the second value in the pair | Cmn |

## Public constructors

### LongLongPair

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
LongLongPair(first: Long, second: Long)
```

| Parameters |
|---|---|
| `first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | the first value in the pair |
| `second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | the second value in the pair |

## Public functions

### component1

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun component1(): Long
```

Returns the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#first()` component of the pair. For instance, the first component of `PairLongLong(3, 4)` is `3`.

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

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

### component2

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun component2(): Long
```

Returns the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair#second()` component of the pair. For instance, the second component of `PairLongLong(3, 4)` is `4`.

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

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

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

Checks the two values for equality.

| Parameters |
|---|---|
| `other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair` to which this one is to be checked for equality |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the underlying values of the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair` are both considered equal |

### hashCode

Cmn

```
open fun hashCode(): Int
```

Compute a hash code using the hash codes of the underlying values

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | a hashcode of the `https://developer.android.com/reference/kotlin/androidx/collection/LongLongPair` |

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### first

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
val first: Long
```

the first value in the pair

### second

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
val second: Long
```

the second value in the pair