home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / text / StyleContext$KeyEnumeration.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  1.2 KB  |  34 lines

  1. package com.sun.java.swing.text;
  2.  
  3. import java.util.Enumeration;
  4. import java.util.NoSuchElementException;
  5.  
  6. class StyleContext$KeyEnumeration implements Enumeration {
  7.    // $FF: synthetic field
  8.    private final StyleContext this$0;
  9.    Object[] attr;
  10.    // $FF: renamed from: i int
  11.    int field_0;
  12.  
  13.    StyleContext$KeyEnumeration(StyleContext var1, Object[] var2) {
  14.       this.this$0 = var1;
  15.       this.this$0 = var1;
  16.       this.attr = var2;
  17.       this.field_0 = 0;
  18.    }
  19.  
  20.    public boolean hasMoreElements() {
  21.       return this.field_0 < this.attr.length;
  22.    }
  23.  
  24.    public Object nextElement() {
  25.       if (this.field_0 < this.attr.length) {
  26.          Object var1 = this.attr[this.field_0];
  27.          this.field_0 += 2;
  28.          return var1;
  29.       } else {
  30.          throw new NoSuchElementException();
  31.       }
  32.    }
  33. }
  34.