Packagecom.threerings.util
Interfacepublic interface Cloneable

Implemented by objects that support creating a clone.



Public Methods
 MethodDefined by
  
clone():Object
Create a clone of this object.
Cloneable
Method detail
clone()method
public function clone():Object

Create a clone of this object.

Returns
Object

Example
A smart implementation that allows for subclassing.
     public function clone () :Object
     {
         var myObj :MyClass = MyClass(ClassUtil.newInstance(this)); // requires 0-arg constructor
         myObj.someInt = this.someInt; // copy all vars
         myObj.someArray = this.someArray.concat(); // make a clone of any mutable vars
         return myObj;
     }