Pair

open class Pair<F, S>

Container to ease passing around a tuple of two objects. This object provides a sensible implementation of equals(), returning true if equals() is true on each of the contained objects.

Constructors

Link copied to clipboard
constructor(first: F, second: S)
Constructor for a Pair.

Properties

Link copied to clipboard
val first: F
Link copied to clipboard
val second: S

Functions

Link copied to clipboard
inline operator fun <F, S> Pair<F, S>.component1(): F

Returns the first component of the pair.

Link copied to clipboard
inline operator fun <F, S> Pair<F, S>.component2(): S

Returns the second component of the pair.

Link copied to clipboard
open fun <A, B> create(a: A, b: B): @NonNull Pair<A, B>
Convenience method for creating an appropriately typed pair.
Link copied to clipboard
open fun equals(o: Any): Boolean
Checks the two objects for equality by delegating to their respective equals methods.
Link copied to clipboard
open fun hashCode(): Int
Compute a hash code using the hash codes of the underlying objects
Link copied to clipboard
inline fun <F, S> Pair<F, S>.toKotlinPair(): Pair<F, S>

Returns this AndroidX Pair as a Kotlin Pair.

Link copied to clipboard
@NonNull
open fun toString(): @NonNull String