|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdbrown.Restaurant
public class Restaurant
Field Summary | |
---|---|
private Chef |
chef
The Restaurant's Chef object. |
private boolean |
closed
Tracks whether the restaurant is closed or not. |
private Order |
order
Restaurant owns and creates the original Orders, and controls their sharing between chef and waiter. |
private java.lang.Thread |
t
The Restaurant thread. |
(package private) Waiter[] |
waiters
The Waiters. |
static int |
WAITERS
Number of waiters in restaurant. |
Constructor Summary | |
---|---|
Restaurant()
Restaurant constructor. |
Method Summary | |
---|---|
boolean |
getClosed()
Returns whether the restaurant is closed or not. |
static void |
main(java.lang.String[] args)
Test the threading program. |
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WAITERS
private Chef chef
private boolean closed
private Order order
private java.lang.Thread t
Restaurant
thread.
Waiter[] waiters
Constructor Detail |
---|
public Restaurant()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- Unused.public boolean getClosed()
public void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |