|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectConsumer
class Consumer
This is eatVowels[i]'s thread.
| Field Summary | |
|---|---|
(package private) SyncData |
mySync
Contains synchronization data. |
| Constructor Summary | |
|---|---|
Consumer(SyncData mySync)
Constructor. |
|
| Method Summary | |
|---|---|
void |
consume(char ch)
Consumes the letter. |
String |
getString()
Get all the letters that this thread eated. |
void |
run()
Method invoked by Thread.start(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
SyncData mySync
| Constructor Detail |
|---|
public Consumer(SyncData mySync)
| Method Detail |
|---|
public void run()
Thread.start().
run in interface Runnablepublic void consume(char ch)
getString().
Discards non letters and vowels.
public String getString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||