home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / Observer.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  47 lines

  1. /*
  2.  * @(#)Observer.java    1.10 97/01/28
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22. package java.util;
  23.  
  24. /**
  25.  * A class can implement the <code>Observer</code> interface when it 
  26.  * wants to be informed of changes in observable objects. 
  27.  *
  28.  * @author  Chris Warth
  29.  * @version 1.10, 01/28/97
  30.  * @see     java.util.Observable
  31.  * @since   JDK1.0
  32.  */
  33. public interface Observer { 
  34.     /**
  35.      * This method is called whenever the observed object is changed. An 
  36.      * application calls an observable object's 
  37.      * <code>notifyObservers</code> method  to have all the object's 
  38.      * observers notified of the change. 
  39.      *
  40.      * @param   o     the observable object.
  41.      * @param   arg   an argument passed to the <code>notifyObservers</code>
  42.      *                 method.
  43.      * @since   JDK1.0
  44.      */
  45.     void update(Observable o, Object arg);
  46. }
  47.