Observer接口
package java.util;
//用于实现观察者对象
public interface Observer {
/**
* This method is called whenever the observed object is changed. An
* application calls an <tt>Observable</tt> object's
* <code>notifyObservers</code> method to have all the object's
* observers notified of the change.
*
* @param o the observable object.
* @param arg an argument passed to the <code>notifyObservers</code>
* method.
*/
//当被观察对象o改变时,update方法通知所有arg观察者对象
void update(Observable o, Object arg);
} Java之uitil包源码阅读 文章被收录于专栏
源码阅读是程序员必不可少的,本专栏记录本人阅读java源码笔记,与阅读此专栏的同道共同进步。 本专栏以字典序对源码进行阅读注释,主要工作:1.去除源码中冗长的英语注释,用简短的注释代替;2.对关键语句和算法予以说明。3.概要性描述。
