anthill.nest
Class AntDescriptor

java.lang.Object
  |
  +--anthill.nest.AntDescriptor
All Implemented Interfaces:
Serializable

public class AntDescriptor
extends Object
implements Serializable

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: 1.7 $
Author:
Alberto Montresor
See Also:
Serialized Form

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
 

Constructor Detail

AntDescriptor

public AntDescriptor(NestId sender,
                     Ant ant,
                     int ttl)
Instantiates an ant descriptor and copies the initialization parameters in it.

Method Detail

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.