ReadOnlyArray
is an abstract over an ordinary Array
which only exposes
APIs that don't modify the instance, hence "read-only".
Note that this doesn't necessarily mean that the instance is immutable.
Other code holding a reference to the underlying Array
can still modify it,
and the reference can be obtained with a cast
.
Static variables
Static methods
staticinlineconcat(this:Array<T>, a:ReadOnlyArray<T>):Array<T>
Returns a new Array by appending the elements of a
to the elements of
this
Array.
This operation does not modify this
Array.
If a
is the empty Array []
, a copy of this
Array is returned.
The length of the returned Array is equal to the sum of this.length
and a.length
.
If a
is null
, the result is unspecified.