home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- class HashMap$HashIterator implements Iterator {
- HashMap.Entry[] table;
- int index;
- HashMap.Entry entry;
- HashMap.Entry lastReturned;
- int type;
- private int expectedModCount;
- // $FF: synthetic field
- private final HashMap this$0;
-
- HashMap$HashIterator(HashMap var1, int var2) {
- this.this$0 = var1;
- this.table = HashMap.access$200(this.this$0);
- this.index = this.table.length;
- this.entry = null;
- this.lastReturned = null;
- this.expectedModCount = HashMap.access$300(this.this$0);
- this.type = var2;
- }
-
- public boolean hasNext() {
- HashMap.Entry var1 = this.entry;
- int var2 = this.index;
-
- for(HashMap.Entry[] var3 = this.table; var1 == null && var2 > 0; var1 = var3[var2]) {
- --var2;
- }
-
- this.entry = var1;
- this.index = var2;
- return var1 != null;
- }
-
- public Object next() {
- if (HashMap.access$300(this.this$0) != this.expectedModCount) {
- throw new ConcurrentModificationException();
- } else {
- HashMap.Entry var1 = this.entry;
- int var2 = this.index;
-
- for(HashMap.Entry[] var3 = this.table; var1 == null && var2 > 0; var1 = var3[var2]) {
- --var2;
- }
-
- this.entry = var1;
- this.index = var2;
- if (var1 != null) {
- HashMap.Entry var4 = this.lastReturned = this.entry;
- this.entry = var4.next;
- return this.type == 0 ? var4.key : (this.type == 1 ? var4.value : var4);
- } else {
- throw new NoSuchElementException();
- }
- }
- }
-
- public void remove() {
- if (this.lastReturned == null) {
- throw new IllegalStateException();
- } else if (HashMap.access$300(this.this$0) != this.expectedModCount) {
- throw new ConcurrentModificationException();
- } else {
- HashMap.Entry[] var1 = HashMap.access$200(this.this$0);
- int var2 = (this.lastReturned.hash & Integer.MAX_VALUE) % var1.length;
- HashMap.Entry var3 = var1[var2];
-
- for(HashMap.Entry var4 = null; var3 != null; var3 = var3.next) {
- if (var3 == this.lastReturned) {
- HashMap.access$308(this.this$0);
- ++this.expectedModCount;
- if (var4 == null) {
- var1[var2] = var3.next;
- } else {
- var4.next = var3.next;
- }
-
- HashMap.access$110(this.this$0);
- this.lastReturned = null;
- return;
- }
-
- var4 = var3;
- }
-
- throw new ConcurrentModificationException();
- }
- }
- }
-