Source of Buffer.java


  1: // Fig. 23.6: Buffer.java
  2: // Buffer interface specifies methods called by Producer and Consumer.
  3: 
  4: public interface Buffer 
  5: {
  6:    public void set( int value ); // place int value into Buffer
  7:    public int get(); // return int value from Buffer
  8: } // end interface Buffer
  9: 
 10: 
 11: /**************************************************************************
 12:  * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and               *
 13:  * Pearson Education, Inc. All Rights Reserved.                           *
 14:  *                                                                        *
 15:  * DISCLAIMER: The authors and publisher of this book have used their     *
 16:  * best efforts in preparing the book. These efforts include the          *
 17:  * development, research, and testing of the theories and programs        *
 18:  * to determine their effectiveness. The authors and publisher make       *
 19:  * no warranty of any kind, expressed or implied, with regard to these    *
 20:  * programs or to the documentation contained in these books. The authors *
 21:  * and publisher shall not be liable in any event for incidental or       *
 22:  * consequential damages in connection with, or arising out of, the       *
 23:  * furnishing, performance, or use of these programs.                     *
 24:  *************************************************************************/