home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / util / Observer.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.2 KB  |  39 lines

  1. /*
  2.  * @(#)Observer.java    1.13 98/03/18
  3.  *
  4.  * Copyright 1994-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package java.util;
  15.  
  16. /**
  17.  * A class can implement the <code>Observer</code> interface when it 
  18.  * wants to be informed of changes in observable objects. 
  19.  *
  20.  * @author  Chris Warth
  21.  * @version 1.13, 03/18/98
  22.  * @see     java.util.Observable
  23.  * @since   JDK1.0
  24.  */
  25. public interface Observer { 
  26.     /**
  27.      * This method is called whenever the observed object is changed. An 
  28.      * application calls an <tt>Observable</tt> object's 
  29.      * <code>notifyObservers</code> method to have all the object's 
  30.      * observers notified of the change. 
  31.      *
  32.      * @param   o     the observable object.
  33.      * @param   arg   an argument passed to the <code>notifyObservers</code>
  34.      *                 method.
  35.      * @since   JDK1.0
  36.      */
  37.     void update(Observable o, Object arg);
  38. }
  39.