| Method | Defined by | ||
|---|---|---|---|
|
clone(ar:Array):Array
[static]
Creates the shallow copy of the Array.
| ArrayUtil | ||
|
copy(ar:Array):Array
[static]
Creates the deep copy of the Array.
| ArrayUtil | ||
|
toSource(ar:Array, ... rest):String
[static]
Returns a string representing the source code of the array.
| ArrayUtil | ||
| clone | () | method |
public static function clone(ar:Array):ArrayCreates the shallow copy of the Array.
Example :
import vegas.util.ArrayUtil ;
var ar1:Array = [ [2, 3, 4] , [5, 6, 7] ] ;
var ar2:Array = ArrayUtil.clone(ar1) ;
trace( 'clone : ' + ar1 + " : " + ar2 ) ; // 2,3,4,5,6,7
trace( 'ar1 == ar2 : ' + ( ar1 == ar2 ) ) ; // false
trace( 'ar1[0] == ar2[0] : ' + ( ar1[0] == ar2[0] ) ) ; // true
Parameters
ar:Array |
Array — the shallow copy of the Array.
|
| copy | () | method |
public static function copy(ar:Array):ArrayCreates the deep copy of the Array.
Example :
import vegas.util.ArrayUtil ;
var ar1:Array = [ [2, 3, 4] , [5, 6, 7] ] ;
var ar2:Array = ArrayUtil.copy(ar1) ;
trace( 'copy : ' + ar1 + " : " + ar2 ) ; // 2,3,4,5,6,7
trace( 'ar1 == ar2 : ' + ( ar1 == ar2 ) ) ; // false
trace( 'ar1[0] == ar2[0] : ' + ( ar1[0] == ar2[0] ) ) ; // false
Parameters
ar:Array |
Array — the deep copy of the Array.
|
| toSource | () | method |
public static function toSource(ar:Array, ... rest):StringReturns a string representing the source code of the array.
Parametersar:Array |
|
... rest |
String — a string representing the source code of the array.
|