gnutant
Class Gnutant
java.lang.Object
|
+--gnutant.Gnutant
- All Implemented Interfaces:
- Ant, java.io.Serializable
- public class Gnutant
- extends java.lang.Object
- implements Ant, java.io.Serializable
- Version:
- $Revision$
- Author:
- Alberto Montresor, Hein Meling
- See Also:
- Serialized Form
Constructor Summary |
Gnutant(RequestId rid,
java.lang.String query,
KeyHash key,
NestId requestor)
Instantiate a new Gnutant by setting the query to be satisfied and the
hash value to be searched. |
Method Summary |
java.lang.String |
getSpecies()
Returns the identifier of the "species" of this ant.
|
void |
init(AntView view)
FIXME: add this method to AntView; add the invocation of this
method in the local nest. |
void |
readExternal(java.io.ObjectInput in)
|
void |
run(AntView view)
This method encapsulate the computation performed by the
ant. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gnutant
public Gnutant(RequestId rid,
java.lang.String query,
KeyHash key,
NestId requestor)
- Instantiate a new Gnutant by setting the query to be satisfied and the
hash value to be searched.
getSpecies
public java.lang.String getSpecies()
- Description copied from interface:
Ant
- Returns the identifier of the "species" of this ant.
Different ant species may have access to different
pheromone information in nests.
- Specified by:
getSpecies
in interface Ant
init
public void init(AntView view)
- FIXME: add this method to AntView; add the invocation of this
method in the local nest. Note that this method should be used only for
ant configuration, so we may want to disable move and addAnt
in view.
- Specified by:
init
in interface Ant
run
public void run(AntView view)
- This method encapsulate the computation performed by the
ant.
- Specified by:
run
in interface Ant
- Parameters:
view
- reference to the AntView object which
constitutes the controlled environment of the ant
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)