ants.messor
Class PheromoneEntry

java.lang.Object
  |
  +--ants.messor.PheromoneEntry
All Implemented Interfaces:
Comparable

public class PheromoneEntry
extends Object
implements Comparable

Data structure containing the identifier of a nest and the load associated to it.

Version:
$Revision: 1.2 $
Author:
Alberto Montresor

Constructor Summary
PheromoneEntry(NestId id, int load, int time)
           
 
Method Summary
 int compareTo(Object o2)
           
 boolean equals(Object obj)
           
 int getLoad()
          Return the load of the nest contained in this entry.
 NestId getNestId()
          Return the identifier of the nest contained in this entry.
 int getTime()
          Return the time in which this entry has been inserted in the pheromone table.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PheromoneEntry

public PheromoneEntry(NestId id,
                      int load,
                      int time)
Method Detail

getNestId

public NestId getNestId()
Return the identifier of the nest contained in this entry.


getLoad

public int getLoad()
Return the load of the nest contained in this entry.


getTime

public int getTime()
Return the time in which this entry has been inserted in the pheromone table.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o2)
Specified by:
compareTo in interface Comparable