LongLongPair



Container to ease passing around a tuple of two Long values.

Summary

Public constructors

LongLongPair(first: Long, second: Long)
Cmn

Public functions

inline operator Long

Returns the first component of the pair.

Cmn
inline operator Long

Returns the second component of the pair.

Cmn
open operator Boolean
equals(other: Any?)

Checks the two values for equality.

Cmn
open Int

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

Cmn
open String
Cmn

Public properties

Long

the first value in the pair

Cmn
Long

the second value in the pair

Cmn

Public constructors

LongLongPair

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

the first value in the pair

second: Long

the second value in the pair

Public functions

component1

inline operator fun component1(): Long

Returns the 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:

val (first, second) = myPair

component2

inline operator fun component2(): Long

Returns the 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:

val (first, second) = myPair

equals

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

Checks the two values for equality.

Parameters
other: Any?

the LongLongPair to which this one is to be checked for equality

Returns
Boolean

true if the underlying values of the LongLongPair are both considered equal

hashCode

open fun hashCode(): Int

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

Returns
Int

a hashcode of the LongLongPair

toString

open fun toString(): String

Public properties

first

val firstLong

the first value in the pair

second

val secondLong

the second value in the pair