Class Consumer

java.lang.Object
  extended by Consumer
All Implemented Interfaces:
Runnable

 class Consumer
extends Object
implements Runnable

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

mySync

SyncData mySync
Contains synchronization data.

Constructor Detail

Consumer

public Consumer(SyncData mySync)
Constructor.

Method Detail

run

public void run()
Method invoked by Thread.start().

Specified by:
run in interface Runnable

consume

public void consume(char ch)
Consumes the letter. Stores the character in a string that can be obtained invoking getString(). Discards non letters and vowels.


getString

public String getString()
Get all the letters that this thread eated.