Pair
Stores two typed values with component-wise equality and positional destructuring.
The component references cannot be replaced, but objects stored in them may still be mutable. Construction and copy retain those values without making deep copies. Both component types may be nullable. Guest Pair type parameters are invariant.
val entry = "name" to 42
val (name, value) = entryContent copied to clipboard
Parameters
first
first component value.
second
second component value.
Type Parameters
A
type of the first component.
B
type of the second component.
See also
Constructors
Properties
Functions
Link copied to clipboard
Returns the first component for positional destructuring.
Link copied to clipboard
Returns the second component for positional destructuring.
Link copied to clipboard
Compares this pair with another PairComponents value component by component.