home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / 1&1 / java.z / java_301 / java / util / ObserverList.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-10-20  |  771 b   |  18 lines

  1. package java.util;
  2.  
  3. class ObserverList extends Vector {
  4.    public void notifyObservers(Observable who, Object arg) {
  5.       int i = ((Vector)this).size();
  6.  
  7.       while(true) {
  8.          --i;
  9.          if (i < 0) {
  10.             return;
  11.          }
  12.  
  13.          Observer o = (Observer)((Vector)this).elementAt(i);
  14.          o.update(who, arg);
  15.       }
  16.    }
  17. }
  18.