org.jgap.impl
Class DefaultInitializer
- java.lang.Object
-
- org.jgap.impl.DefaultInitializer
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, IHandler, IInitializer, ICloneable
public class DefaultInitializer extends java.lang.Object implements IInitializer, ICloneable, java.io.Serializable
Default implementation for initializing Chromosomes.- Since:
- 2.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DefaultInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()booleanisHandlerFor(java.lang.Object a_obj, java.lang.Class a_class)Determines whether the handler is suitable for the given object instance or class.java.lang.Objectperform(java.lang.Object a_obj, java.lang.Class a_class, java.lang.Object a_params)Performs a task for the given object or class.
-
-
-
Method Detail
-
isHandlerFor
public boolean isHandlerFor(java.lang.Object a_obj, java.lang.Class a_class)Description copied from interface:IHandlerDetermines whether the handler is suitable for the given object instance or class.- Specified by:
isHandlerForin interfaceIHandler- Parameters:
a_obj- the object instance to checka_class- the class to check, alternatively if no object instance is available (some handlers could need to get an object and would always return false if only a class is provided)- Returns:
- true: handler suitable for given object or class
-
perform
public java.lang.Object perform(java.lang.Object a_obj, java.lang.Class a_class, java.lang.Object a_params) throws java.lang.ExceptionDescription copied from interface:IHandlerPerforms a task for the given object or class. For some handlers, additional parameters are necessary, which could be provided.- Specified by:
performin interfaceIHandler- Parameters:
a_obj- the object instance to perform the handler task fora_class- the class to perform the handler task for, in case no object instance is available (some handlers could need to get an object and would always throw an exception if only a class is provided)a_params- optional parameters needed for the handler to perform its task- Returns:
- Object
- Throws:
java.lang.Exception- in case of any error
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- deep clone of this instance
- Since:
- 3.2
-
-
DMelt 3.0 © DataMelt by jWork.ORG