Make it possible to create and populate a TypedArray in a single expression.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5386 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -75,12 +75,15 @@ public dynamic class TypedArray extends Array
|
|||||||
* Adds all of the elements of the supplied array to this typed array. The types of the
|
* Adds all of the elements of the supplied array to this typed array. The types of the
|
||||||
* elements of the target array must, of course, be of the type specified for this array
|
* elements of the target array must, of course, be of the type specified for this array
|
||||||
* otherwise badness will ensue.
|
* otherwise badness will ensue.
|
||||||
|
*
|
||||||
|
* @return this array instance for handy call chainability.
|
||||||
*/
|
*/
|
||||||
public function addAll (other :Array) :void
|
public function addAll (other :Array) :TypedArray
|
||||||
{
|
{
|
||||||
for (var ii :int = 0; ii < other.length; ii++) {
|
for (var ii :int = 0; ii < other.length; ii++) {
|
||||||
push(other[ii]);
|
push(other[ii]);
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getJavaType () :String
|
public function getJavaType () :String
|
||||||
|
|||||||
Reference in New Issue
Block a user