MutablePair

data class MutablePair<A, B>(var first: A, var second: B)

A mutable pair of values.

There is no meaning attached to values in this class, it can be used for any purpose. Pair exhibits value semantics, i.e. two pairs are equal if both components are equal.

Parameters

A

type of the first value.

B

type of the second value.

Constructors

Link copied to clipboard
constructor(first: A, second: B)

Creates a new instance of Pair.

Properties

Link copied to clipboard
var first: A

First value.

Link copied to clipboard
var second: B

Second value.

Functions

Link copied to clipboard
open override fun toString(): String

Returns string representation of the MutablePair including its first and second values.