home *** CD-ROM | disk | FTP | other *** search
- package java.text;
-
- class CompactShortArray$Iterator {
- int nextIndex;
- int index;
- short nextValue;
- short value;
- short iUntouched;
- boolean touched;
- short defValue;
- // $FF: synthetic field
- private final CompactShortArray this$0;
-
- CompactShortArray$Iterator(CompactShortArray var1) {
- this.this$0 = var1;
- this.nextIndex = -1;
- this.index = -1;
- this.iUntouched = -1;
- this.touched = true;
- this.defValue = this.this$0.defaultValue;
- var1.compact();
- }
-
- public boolean hasNext() {
- this.nextIndex = this.index;
- boolean var1 = true;
- if (this.index != this.nextIndex) {
- return true;
- } else {
- while(++this.nextIndex < 65535) {
- if ((this.nextIndex & 127) == 0) {
- int var2 = this.nextIndex >> 7;
- if (CompactShortArray.access$000(this.this$0)[var2] == this.iUntouched) {
- this.nextIndex += 127;
- continue;
- }
-
- if (this.iUntouched == -1 && !this.touched) {
- this.iUntouched = CompactShortArray.access$000(this.this$0)[var2 - 1];
- } else {
- this.touched = false;
- }
- }
-
- this.nextValue = this.this$0.elementAt((char)this.nextIndex);
- if (this.nextValue != this.defValue) {
- this.touched = true;
- break;
- }
- }
-
- return this.nextIndex < 65535;
- }
- }
-
- public char next() {
- if (this.index == this.nextIndex && !this.hasNext()) {
- throw new ArrayIndexOutOfBoundsException();
- } else {
- this.index = this.nextIndex;
- this.value = this.nextValue;
- return (char)this.index;
- }
- }
-
- public short shortValue() {
- return this.value;
- }
- }
-