|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.nott.cs.g54dia.library.Task
public class Task
A environment cell which contains an task
Field Summary | |
---|---|
(package private) boolean |
accepted
|
(package private) boolean |
completed
|
(package private) int |
demand
|
static int |
MAX_DEMAND
The maximum size of a demand for water |
(package private) Station |
station
|
(package private) int |
supplied
|
Constructor Summary | |
---|---|
Task(Station s)
|
Method Summary | |
---|---|
protected void |
accept()
|
int |
getRequired()
How much water is required to complete the task? |
Point |
getStationPosition()
Get the position of the station to which water should be delivered |
int |
getWaterDemand()
Get the amount of water to be delivered to the station |
boolean |
isComplete()
Is this task completed? |
protected void |
setWaterDemand(int d)
|
protected void |
supply(int s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_DEMAND
Station station
int demand
int supplied
boolean accepted
boolean completed
Constructor Detail |
---|
Task(Station s)
Method Detail |
---|
public Point getStationPosition()
public int getWaterDemand()
public boolean isComplete()
public int getRequired()
protected void setWaterDemand(int d)
protected void accept()
protected void supply(int s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |