Java Eyes Problem Set Javadocs

cs101.util.semaphore
Class PNCBuffer

java.lang.Object
  extended bycs101.util.semaphore.PNCBuffer

public final class PNCBuffer
extends java.lang.Object

cs101.util.PNCBuffer implements a producer/consumer synchronized buffer. Interface is pncBuffer.putWord(String), pncBuffer.getNextWord().
Copyright 1996 Massachusetts Institute of Technology

Version:
$Id: PNCBuffer.java,v 1.4 2003/09/23 14:41:25 gus Exp $
Author:
Lynn Andrea Stein, las@ai.mit.edu
See Also:
BS

Constructor Summary
PNCBuffer()
           
 
Method Summary
 java.lang.String getNextWord()
          (Safely) Consumes the word held in the PNCBuffer.
 void putWord(java.lang.String newWord)
          (Safely) Puts a word into the PNCBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNCBuffer

public PNCBuffer()
Method Detail

putWord

public void putWord(java.lang.String newWord)
(Safely) Puts a word into the PNCBuffer.

Parameters:
newWord - the word to be inserted.
See Also:
getNextWord(), BS

getNextWord

public java.lang.String getNextWord()
(Safely) Consumes the word held in the PNCBuffer.

Returns:
the word.
See Also:
putWord(java.lang.String), BS

Java Eyes Problem Set Javadocs