home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / java / text / Normalizer$DecompIterator.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  60 lines

  1. package java.text;
  2.  
  3. class Normalizer$DecompIterator {
  4.    private CompactShortArray.Iterator iter = Normalizer.access$300().getIterator();
  5.    private StringBuffer buf = new StringBuffer();
  6.    private int decmpLimit = -1;
  7.    private short nextChar = -1;
  8.  
  9.    Normalizer$DecompIterator(int var1) {
  10.       switch (var1) {
  11.          case 1:
  12.             this.decmpLimit = Normalizer.access$100();
  13.             break;
  14.          case 2:
  15.             this.decmpLimit = Normalizer.access$000();
  16.       }
  17.  
  18.    }
  19.  
  20.    boolean hasNext() {
  21.       label26:
  22.       while(true) {
  23.          if (this.nextChar == -1 && this.iter.hasNext()) {
  24.             char var1 = this.iter.next();
  25.             short var2 = this.iter.shortValue();
  26.             if (var2 >= this.decmpLimit) {
  27.                continue;
  28.             }
  29.  
  30.             this.nextChar = (short)var1;
  31.             this.buf.setLength(0);
  32.  
  33.             while(true) {
  34.                if ((var1 = Normalizer.access$200().charAt(var2++)) == 0) {
  35.                   continue label26;
  36.                }
  37.  
  38.                this.buf.append(var1);
  39.             }
  40.          }
  41.  
  42.          return this.nextChar != -1;
  43.       }
  44.    }
  45.  
  46.    char next() {
  47.       if (this.nextChar == -1 && !this.hasNext()) {
  48.          throw new ArrayIndexOutOfBoundsException();
  49.       } else {
  50.          char var1 = (char)this.nextChar;
  51.          this.nextChar = -1;
  52.          return var1;
  53.       }
  54.    }
  55.  
  56.    String decomposition() {
  57.       return this.buf.toString();
  58.    }
  59. }
  60.