v2026.6.0
All Bundles
Bundle Typed tuple classes (Pair, Triple, Quad) for grouping related values without defining a class. Immutable by design; use as map keys or return values. Compile with -lib gen_collect.

Triplet

Tuple class that supports 3 values

triplet := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
triplet->GetFirst()->PrintLine();
triplet->GetSecond()->PrintLine();
triplet->GetThird()->PrintLine();

Operations

GetFirst #

Returns the first value

method : public : GetFirst() ~ A

Return

TypeDescription
Afirst value

Example

t := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
t->GetFirst()->PrintLine(); # Alice

GetSecond #

Returns the second value

method : public : GetSecond() ~ B

Return

TypeDescription
Bsecond value

Example

t := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
t->GetSecond()->PrintLine(); # 30

GetThird #

Returns the third value

method : public : GetThird() ~ C

Return

TypeDescription
Cthird value

Example

t := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
t->GetThird()->PrintLine(); # true

New # constructor

Constructor.

New(a:A, b:B, c:C)

Parameters

NameTypeDescription
aAfirst parameter
bBsecond parameter
cCthird parameter

Example

t := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
t->GetFirst()->PrintLine();  # Alice
t->GetSecond()->PrintLine(); # 30
t->GetThird()->PrintLine();  # true

ToString #

Formats tuple into a string

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation

Example

t := Collection.Tuple.Triplet->New("Alice", 30, true)<String, IntRef, BoolRef>;
t->ToString()->PrintLine(); # [Alice,30,true]