ants.messor
Class SimulatedTask

java.lang.Object
  |
  +--ants.messor.SimulatedTask
All Implemented Interfaces:
RequestId, Task

public class SimulatedTask
extends Object
implements Task, RequestId

For the purpose of simulation, a task does not perform anything. It just implements a request identifier. In this simple implementation, all tasks are equal: i.e., they last

Version:
$Revision: 1.2 $
Author:
Alberto Montresor

Constructor Summary
SimulatedTask()
           
 
Method Summary
 boolean equals(Object obj)
          Check whether this SimulatedTask is equal to the specified object.
 int getLoad()
          Returns the load associated to this task.
 NestId getNestId()
          Unsupported operation
 int hashCode()
          Returns a hash code value for the object.
 void run()
          Method to be invoked to execute this task.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimulatedTask

public SimulatedTask()
Method Detail

run

public void run()
Method to be invoked to execute this task.

Specified by:
run in interface Task

getLoad

public int getLoad()
Returns the load associated to this task.

Specified by:
getLoad in interface Task

getNestId

public NestId getNestId()
Unsupported operation

Specified by:
getNestId in interface RequestId

equals

public boolean equals(Object obj)
Check whether this SimulatedTask is equal to the specified object.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object