anthill.nest
Class AntDescriptor
java.lang.Object
|
+--anthill.nest.AntDescriptor
- public class AntDescriptor
- extends java.lang.Object
This class contains information about an ant,including the
identifier of the nest which has sent it to this host, the
identifier of the ant, the remaining time-to-live and a
reference to the ant itself.
- Version:
- $Revision$
- Author:
- Alberto Montresor
Constructor Summary |
AntDescriptor(NestId sender,
Ant ant,
int ttl)
Instantiates an ant descriptor and copies the initialization
parameters in it. |
Method Summary |
Ant |
getAnt()
Return a reference to the ant associated with this ant descriptor. |
NestId |
getLastVisited()
Return the identifier of the last nest visited by the ant associated
with this ant descriptor. |
int |
getTTL()
Return the remaining time-to-live of this ant. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AntDescriptor
public AntDescriptor(NestId sender,
Ant ant,
int ttl)
- Instantiates an ant descriptor and copies the initialization
parameters in it.
getAnt
public Ant getAnt()
- Return a reference to the ant associated with this ant descriptor.
getLastVisited
public NestId getLastVisited()
- Return the identifier of the last nest visited by the ant associated
with this ant descriptor.
getTTL
public int getTTL()
- Return the remaining time-to-live of this ant.