Packagevegas.util
Classpublic class Copier

The Copier utility class is an all-static class with a method to returns a copy representation of an object.

See also

ICopyable


Public Methods
 MethodDefined by
  
copy(o:*):*
[static] Returns a deep copy of the specified object passed in argument.
Copier
Method detail
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:*

Returns
* — a deep copy of the specified object passed in argument.