org.jgap.impl
Class DefaultCloneHandler
- java.lang.Object
-
- org.jgap.impl.DefaultCloneHandler
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, ICloneHandler, IHandler, ICloneable
public class DefaultCloneHandler extends java.lang.Object implements ICloneHandler, ICloneable, java.io.Serializable, java.lang.Comparable
Default clone handler supporting IApplicationData as well as implementations of Cloneable (for the latter: in case the clone-method is accessible via reflection).- Since:
- 2.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DefaultCloneHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()intcompareTo(java.lang.Object a_other)booleanisHandlerFor(java.lang.Object a_obj, java.lang.Class a_clazz)Handles all implementations of IApplicationData as well as all of java.lang.Cloneable (for which the clone-method is accessible via reflection.java.lang.Objectperform(java.lang.Object a_objToClone, java.lang.Class a_class, java.lang.Object a_params)Performs the clone operation.
-
-
-
Method Detail
-
isHandlerFor
public boolean isHandlerFor(java.lang.Object a_obj, java.lang.Class a_clazz)Handles all implementations of IApplicationData as well as all of java.lang.Cloneable (for which the clone-method is accessible via reflection. This is not the case for package protected classes, e.g.).- Specified by:
isHandlerForin interfaceIHandler- Parameters:
a_obj- the object to check for (maybe null)a_clazz- the class to check for whether it is handled (maybe null)- Returns:
- true in case class is clonable via this handler
- Since:
- 2.6
-
perform
public java.lang.Object perform(java.lang.Object a_objToClone, java.lang.Class a_class, java.lang.Object a_params)Performs the clone operation.
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- deep clone of this instance
- Since:
- 3.2
-
compareTo
public int compareTo(java.lang.Object a_other)
- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
a_other- sic- Returns:
- as always
- Since:
- 3.2
-
-
DMelt 3.0 © DataMelt by jWork.ORG