de.upb.swtpra05.group03.shuttle
Class Task

java.lang.Object
  extended byde.upb.swtpra05.group03.shuttle.Task
Direct Known Subclasses:
DoNothingUntilTask, GetConnectionOkTask, LoadShuttleTask, RepairShuttleTask, UnloadShuttleTask

public abstract class Task
extends java.lang.Object

Task of the shuttle to execute.

Version:
$Revision: 1.3 $

Field Summary
protected  boolean active
           
protected  int costs
           
protected  int duration
           
protected  boolean executed
           
protected  de.upb.swtpra.kernel.id.OrderID orderId
           
protected  int stationId
           
 
Constructor Summary
Task(int costs, int duration, de.upb.swtpra.kernel.id.OrderID orderId, int stationId)
           
 
Method Summary
abstract  de.upb.swtpra.kernel.message.Message execute(de.upb.swtpra.kernel.id.ID sender, de.upb.swtpra.kernel.id.ID receiver)
          Description of the Method
 int getCosts()
          Gets the cost attribute of the Task object
 int getDuration()
          Gets the duration attribute of the Task object
 de.upb.swtpra.kernel.id.OrderID getOrderId()
          Gets the station attribute of the Task object
 int getStationId()
          Gets the stationId attribute of the Task object
 boolean isActive()
          Gets the active attribute of the Task object
 boolean isExecuted()
           
 void setActive(boolean active)
          Sets the active attribute of the Task object
 void setCosts(int costs)
          Sets the cost attribute of the Task object
 void setDuration(int duration)
          Sets the duration attribute of the Task object
 void setExecuted(boolean b)
           
 void setOrderId(de.upb.swtpra.kernel.id.OrderID orderId)
          Sets the station attribute of the Task object
 java.lang.String toString()
          Description of the Method
 java.util.Vector toStringVector()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

costs

protected int costs

duration

protected int duration

active

protected boolean active

executed

protected boolean executed

orderId

protected de.upb.swtpra.kernel.id.OrderID orderId

stationId

protected int stationId
Constructor Detail

Task

public Task(int costs,
            int duration,
            de.upb.swtpra.kernel.id.OrderID orderId,
            int stationId)
Parameters:
duration -
orderId - Description of the Parameter
stationId - Description of the Parameter
costs - Description of the Parameter
Method Detail

getStationId

public int getStationId()
Gets the stationId attribute of the Task object

Returns:
The stationId value

getCosts

public int getCosts()
Gets the cost attribute of the Task object

Returns:
The cost value

setCosts

public void setCosts(int costs)
Sets the cost attribute of the Task object

Parameters:
costs - The new costs value

getDuration

public int getDuration()
Gets the duration attribute of the Task object

Returns:
The duration value

setDuration

public void setDuration(int duration)
Sets the duration attribute of the Task object

Parameters:
duration - The new duration value

getOrderId

public de.upb.swtpra.kernel.id.OrderID getOrderId()
Gets the station attribute of the Task object

Returns:
The station value

setOrderId

public void setOrderId(de.upb.swtpra.kernel.id.OrderID orderId)
Sets the station attribute of the Task object

Parameters:
orderId - The new orderId value

isActive

public boolean isActive()
Gets the active attribute of the Task object

Returns:
The active value

setActive

public void setActive(boolean active)
Sets the active attribute of the Task object

Parameters:
active - The new active value

execute

public abstract de.upb.swtpra.kernel.message.Message execute(de.upb.swtpra.kernel.id.ID sender,
                                                             de.upb.swtpra.kernel.id.ID receiver)
Description of the Method

Parameters:
sender - Description of the Parameter
receiver - Description of the Parameter
Returns:
Description of the Return Value

toString

public java.lang.String toString()
Description of the Method

Returns:
Description of the Return Value

toStringVector

public java.util.Vector toStringVector()
Description of the Method

Returns:
Description of the Return Value

isExecuted

public boolean isExecuted()
Returns:
executed

setExecuted

public void setExecuted(boolean b)
Parameters:
b -