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.
Quintet
Quintet class that supports 5 values
quintet := Collection.Tuple.Quintet->New("test", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
quintet->GetFirst()->PrintLine();
quintet->GetSecond()->PrintLine();
quintet->GetFifth()->PrintLine();Operations
GetFifth #
Returns the fifth value
method : public : GetFifth() ~ EReturn
| Type | Description |
|---|---|
| E | fifth value |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetFifth()->PrintLine(); # trueGetFirst #
Returns the first value
method : public : GetFirst() ~ AReturn
| Type | Description |
|---|---|
| A | first value |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetFirst()->PrintLine(); # xGetFourth #
Returns the fourth value
method : public : GetFourth() ~ DReturn
| Type | Description |
|---|---|
| D | fourth value |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetFourth()->PrintLine(); # aGetSecond #
Returns the second value
method : public : GetSecond() ~ BReturn
| Type | Description |
|---|---|
| B | second value |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetSecond()->PrintLine(); # 1GetThird #
Returns the third value
method : public : GetThird() ~ CReturn
| Type | Description |
|---|---|
| C | third value |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetThird()->PrintLine(); # 2.5New # constructor
Constructor.
New(a:A, b:B, c:C, d:D, e:E)Parameters
| Name | Type | Description |
|---|---|---|
| a | A | first parameter |
| b | B | second parameter |
| c | C | third parameter |
| d | D | fourth parameter |
| e | E | fifth parameter |
Example
q := Collection.Tuple.Quintet->New("x", 1, 2.5, 'a', true)<String, IntRef, FloatRef, CharRef, BoolRef>;
q->GetFirst()->PrintLine(); # x
q->GetFifth()->PrintLine(); # true