|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Supplier
public class Supplier
A supplier of grain.
CS 537, Spring 2007, Project 3.
Field Summary | |
---|---|
private Order |
delivered
Total delivered thus far. |
private int |
iterations
Number of times to iterate before terminating. |
private Order |
maxSupply
Maximum amount of each grain to supply on each iteration. |
private int |
meanSleepTime
Mean time to sleep between iterations (in milliseconds). |
private static int |
VERSION
Source version number. |
Constructor Summary | |
---|---|
Supplier(int iterations)
Creates a new supplier. |
Method Summary | |
---|---|
Order |
getProduction()
Indicates the amount of each grain delivered. |
void |
run()
Main loop. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int VERSION
private int iterations
private int meanSleepTime
private Order maxSupply
private Order delivered
Constructor Detail |
---|
public Supplier(int iterations)
iterations
- the number of times to iterate before terminating.Method Detail |
---|
public Order getProduction()
public void run()
run
in interface Runnable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |