KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgap > IChromosomePool


1 /*
2  * This file is part of JGAP.
3  *
4  * JGAP offers a dual license model containing the LGPL as well as the MPL.
5  *
6  * For licencing information please see the file license.txt included with JGAP
7  * or have a look at the top of class org.jgap.Chromosome which representatively
8  * includes the JGAP license policy applicable for any file delivered with JGAP.
9  */

10 package org.jgap;
11
12 /**
13  * Interface for chromosome pools (e.g., see class ChromosomePool).
14  *
15  * @author Klaus Meffert
16  * @since 2.6
17  */

18 public interface IChromosomePool {
19   /** String containing the CVS revision. Read out via reflection!*/
20   final static String JavaDoc CVS_REVISION = "$Revision: 1.2 $";
21
22   /**
23    * Attempts to acquire an Chromosome instance from the chromosome pool.
24    *
25    * @return a Chromosome instance from the pool or null if no Chromosome
26    * instances are available in the pool
27    *
28    * @author Neil Rostan
29    * @since 2.6 (since 1.0 in ChromosomePool)
30    */

31   IChromosome acquireChromosome();
32
33   /**
34    * Releases a Chromosome to the pool. It's not required that the Chromosome
35    * originated from the pool--any Chromosome can be released to it. This
36    * method should invoke the cleanup() method on each of the Chromosome's
37    * genes prior to adding it back to the pool.
38    *
39    * @param a_chromosome the Chromosome instance to be released into the pool
40    *
41    * @author Neil Rostan
42    * @since 2.6 (since 1.0 in ChromosomePool)
43    */

44   void releaseChromosome(IChromosome a_chromosome);
45 }
46
Popular Tags