Package com.jme3.util.clone
Class IdentityCloneFunction<T>
java.lang.Object
com.jme3.util.clone.IdentityCloneFunction<T>
- All Implemented Interfaces:
- CloneFunction<T>
A CloneFunction implementation that simply returns
  the passed object without cloning it.  This is useful for
  forcing some object types (like Meshes) to be shared between
  the original and cloned object graph.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcloneFields(Cloner cloner, T clone, T object) Does nothing.cloneObject(Cloner cloner, T object) Returns the object directly.
- 
Constructor Details- 
IdentityCloneFunctionpublic IdentityCloneFunction()
 
- 
- 
Method Details- 
cloneObjectReturns the object directly.- Specified by:
- cloneObjectin interface- CloneFunction<T>
- Parameters:
- cloner- The cloner performing the cloning operation.
- object- The original object that needs to be cloned.
- Returns:
- a new instance
 
- 
cloneFieldsDoes nothing.- Specified by:
- cloneFieldsin interface- CloneFunction<T>
- Parameters:
- cloner- The cloner performing the cloning operation.
- clone- The clone previously returned from cloneObject().
- object- The original object that was cloned. This is provided for the very special case where field cloning needs to refer to the original object. Mostly the necessary fields should already be on the clone.
 
 
-