Package com.jme3.util.clone
Class ListCloneFunction<T extends List>
java.lang.Object
com.jme3.util.clone.ListCloneFunction<T>
- All Implemented Interfaces:
- CloneFunction<T>
A CloneFunction implementation that deep clones a list by
  creating a new list and cloning its values using the cloner.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcloneFields(Cloner cloner, T clone, T object) Clones the elements of the list.cloneObject(Cloner cloner, T object) Performs a shallow clone of the specified object.
- 
Constructor Details- 
ListCloneFunctionpublic ListCloneFunction()
 
- 
- 
Method Details- 
cloneObjectDescription copied from interface:CloneFunctionPerforms a shallow clone of the specified object. This is similar to the JmeCloneable.clone() method in semantics and is the first part of a two part cloning process. Once the shallow clone is created, it is cached and CloneFunction.cloneFields() is called. In this way, the CloneFunction interface can completely take over the JmeCloneable style cloning for an object that doesn't otherwise implement that interface.- Specified by:
- cloneObjectin interface- CloneFunction<T extends List>
- Parameters:
- cloner- The cloner performing the cloning operation.
- object- The original object that needs to be cloned.
- Returns:
- a new instance
 
- 
cloneFieldsClones the elements of the list.- Specified by:
- cloneFieldsin interface- CloneFunction<T extends List>
- 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.
 
 
-