Tuple
class in package klyn.collections

    public class Tuple<...Ts> extends Object:

Object
└ Tuple

Immutable positional tuple.

A tuple is a fixed-size ordered product where each position may carry a distinct type.

    pair as Tuple<String, Int> = ("age", 42)
    print(pair[0])   # "age"
    print(pair[1])   # 42

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly native property | size `size as ULong` | Number of elements in this tuple.

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public native | Tuple `Tuple(values... as Object)` | Builds a tuple from the provided positional values.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public native override | toString `toString() as String` | Returns a normalized textual representation.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
Operators

Modifier and Type | Member | Description
--- | --- | ---
public readonly native | operator[](index as Int) as Object | Returns the value at the given position.