| Package | vegas.util |
| Class | public class Copier |
Copier utility class is an all-static class with a method to returns a copy representation of an object.
See also
| Method | Defined by | ||
|---|---|---|---|
|
copy(o:*):*
[static]
Returns a deep copy of the specified object passed in argument.
| Copier | ||
| copy | () | method |
public static function copy(o:*):*
Returns a deep copy of the specified object passed in argument. You can use a ICopyable instance or a native object.
Example :
import vegas.data.list.LinkedList ;
import vegas.util.Copier ;
var list:LinkedList = new LinkedList() ;
list.insert("item1") ;
list.insert("item2") ;
var copy:LinkedList = Copier.copy(list) as LinkedList ; // LinkedList is ICopyable !
trace( copy.equals(list) ) ; // true
Parameters
o:* |
* — a deep copy of the specified object passed in argument.
|