antsim.genie
Interface GeneticAntFactory
- public interface GeneticAntFactory
Factory interface for creating ants with genetic codes. This interface
is used by nests to create ant which will be used to perform searches
in the Anthill network.
- Version:
- $Revision: 1.2 $
- Author:
- Alberto Montresor
getAnts
public Ant[] getAnts(GeneticCode code,
Object request)
- Factory method for creating ants. The genetic code of the
ant must be specified, together with the request to be performed.
The genetic code is interpreted by the particular ant species;
if the genetic code is not compatible with the ant species, an
IllegalArgumentException
is thrown.
- Parameters:
code
- the genetic code to be used for the generated antrequest
- the request to be performed
- Throws:
IllegalArgumentException
- if the genetic code is not compatible (e.g., it is longer or
shorter than required) with the specified ant species.