v2026.5.3
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.

Quartet

Tuple class that supports 4 values

quartet := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
quartet->GetFirst()->PrintLine();
quartet->GetSecond()->PrintLine();
quartet->GetThird()->PrintLine();
quartet->GetFourth()->PrintLine();

Operations

GetFirst #

Returns the first value

method : public : GetFirst() ~ A

Return

TypeDescription
Afirst value

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->GetFirst()->PrintLine(); # Bob

GetFourth #

Returns the fourth value

method : public : GetFourth() ~ D

Return

TypeDescription
Dfourth value

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->GetFourth()->PrintLine(); # true

GetSecond #

Returns the second value

method : public : GetSecond() ~ B

Return

TypeDescription
Bsecond value

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->GetSecond()->PrintLine(); # 25

GetThird #

Returns the third value

method : public : GetThird() ~ C

Return

TypeDescription
Cthird value

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->GetThird()->PrintLine(); # 3.14

New # constructor

Constructor.

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

Parameters

NameTypeDescription
aAfirst parameter
bBsecond parameter
cCthird parameter
dDfourth parameter

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->GetFirst()->PrintLine();  # Bob
q->GetFourth()->PrintLine(); # true

ToString #

Formats tuple into a string

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation

Example

q := Collection.Tuple.Quartet->New("Bob", 25, 3.14, true)<String, IntRef, FloatRef, BoolRef>;
q->ToString()->PrintLine(); # [Bob,25,3.14,true]