home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / browser / net_linx / java40.jar / netscape / plugin / composer / io / EntityEnumeration.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  666 b   |  26 lines

  1. package netscape.plugin.composer.io;
  2.  
  3. import java.util.Enumeration;
  4. import java.util.NoSuchElementException;
  5.  
  6. class EntityEnumeration implements Enumeration {
  7.    private Entity[] entities;
  8.    private int index;
  9.  
  10.    public EntityEnumeration(Entity[] var1) {
  11.       this.entities = var1;
  12.    }
  13.  
  14.    public boolean hasMoreElements() {
  15.       return this.index < this.entities.length;
  16.    }
  17.  
  18.    public Object nextElement() {
  19.       if (this.index >= this.entities.length) {
  20.          throw new NoSuchElementException();
  21.       } else {
  22.          return this.entities[this.index++];
  23.       }
  24.    }
  25. }
  26.