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

  1. package netscape.softupdate;
  2.  
  3. import java.util.Enumeration;
  4. import java.util.NoSuchElementException;
  5.  
  6. final class VerRegEnumerator implements Enumeration {
  7.    private String path = "";
  8.    private int state;
  9.  
  10.    public boolean hasMoreElements() {
  11.       int var1 = this.state;
  12.       String var2 = this.regNext();
  13.       this.state = var1;
  14.       return var2 != null;
  15.    }
  16.  
  17.    public Object nextElement() {
  18.       this.path = this.regNext();
  19.       if (this.path == null) {
  20.          throw new NoSuchElementException("VerRegEnumerator");
  21.       } else {
  22.          return "/" + this.path;
  23.       }
  24.    }
  25.  
  26.    private native String regNext();
  27. }
  28.