Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 873 Bytes

README.md

File metadata and controls

43 lines (28 loc) · 873 Bytes

Tuple

Python-like Tuple is a immutable list storate for any type that cannot be changed after inititialized. It has method only for get the information from tuple, not for changing.

Usage

$tupleOfntegers = IntTuple(); // Tuple of integer values
$tupleOfStrings = StringTuple(); // Tuple of string values
$tupleOfFloats = FloatTuple(); // Tuple of float values

// If you need to store any other values use:
$tupleOfMixed = MixedTuple(); 

Available methods

Explain the methods available in StringTuple, but they are the same for all other classes with different value types.

get

get(int $index): ?string

Returns value at the given index or null on not found.

values

all(): array

Returns all tuple values from as array.

count

count(): int

Returns count of values stored in the tuple.