Tuple
classin packageklyn.collections
public class Tuple<...Ts> extends Object:
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
@param <...Ts> Positional element types.
Properties
| Modifier and Type |
Member |
Description |
| public readonly native property |
size |
Number of elements in this tuple. |
Constructors
| Modifier and Type |
Member |
Description |
| public native |
Tuple |
Builds a tuple from the provided positional values. |
Methods
| Modifier and Type |
Member |
Description |
| public native override |
toString |
Returns a normalized textual representation. |
Operators