1 |
/* Implemented when a class wants to be informed of changes in Observable |
/* Observer.java -- an object that will be informed of changes in an Observable |
2 |
objects. |
Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. |
|
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. |
|
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package java.util; |
package java.util; |
40 |
|
|
|
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 |
|
|
* "The Java Language Specification", ISBN 0-201-63451-1 |
|
|
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com. |
|
|
* Status: Believed complete and correct |
|
|
*/ |
|
|
|
|
41 |
/** |
/** |
42 |
* Interface that is implemented when a class wants to be informed of changes |
* Interface that is implemented when a class wants to be informed of changes |
43 |
* in Observable objects. |
* in Observable objects. |
44 |
* |
* |
|
* @see java.util.Observable |
|
45 |
* @author Warren Levy <warrenl@cygnus.com> |
* @author Warren Levy <warrenl@cygnus.com> |
46 |
* @date August 25, 1998. |
* @see Observable |
47 |
|
* @status updated to 1.4 |
48 |
*/ |
*/ |
49 |
public interface Observer |
public interface Observer |
50 |
{ |
{ |
51 |
|
/** |
52 |
|
* This method is called whenever the observable object changes, and has |
53 |
|
* called <code>notifyObservers</code>. The Observable object can pass |
54 |
|
* arbitrary information in the second parameter. |
55 |
|
* |
56 |
|
* @param observable the Observable object that changed |
57 |
|
* @param arg arbitrary information, usually relating to the change |
58 |
|
*/ |
59 |
public void update(Observable observable, Object arg); |
public void update(Observable observable, Object arg); |
60 |
} |
} |