The Sequence interface
(No version information available, might only be in Git)
Introducere
A Sequence describes the behaviour of values arranged in a single, linear dimension.
Some languages refer to this as a "List". It’s similar to an array that uses
incremental integer keys, with the exception of a few characteristics:
- Values will always be indexed as [0, 1, 2, …, size - 1].
- Only allowed to access values by index in the range [0, size - 1].
Use cases:
Descrierea succintă a interfeței
abstract public allocate
(
int $capacity
) :
void
abstract public get
(
int $index
) :
mixed
abstract public insert
(
int $index
,
mixed ...$values
) :
void
abstract public join
(
string $glue
= ?
) :
string
abstract public push
(
mixed ...$values
) :
void
abstract public rotate
(
int $rotations
) :
void
abstract public set
(
int $index
,
mixed $value
) :
void
abstract public sum
(
) :
int|float
}
Cuprins
There are no user contributed notes for this page.