home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- class TreeMap$Iterator implements Iterator {
- private int type;
- private int expectedModCount;
- private TreeMap.Entry lastReturned;
- private TreeMap.Entry next;
- private TreeMap.Entry firstExcluded;
- // $FF: synthetic field
- private final TreeMap this$0;
-
- TreeMap$Iterator(TreeMap var1, int var2) {
- this.this$0 = var1;
- this.expectedModCount = TreeMap.access$1400(this.this$0);
- this.lastReturned = null;
- this.firstExcluded = null;
- this.type = var2;
- this.next = TreeMap.access$100(var1);
- }
-
- TreeMap$Iterator(TreeMap var1, TreeMap.Entry var2, TreeMap.Entry var3) {
- this.this$0 = var1;
- this.expectedModCount = TreeMap.access$1400(this.this$0);
- this.lastReturned = null;
- this.firstExcluded = null;
- this.type = 2;
- this.next = var2;
- this.firstExcluded = var3;
- }
-
- public boolean hasNext() {
- return this.next != this.firstExcluded;
- }
-
- public Object next() {
- if (this.next == this.firstExcluded) {
- throw new NoSuchElementException();
- } else if (TreeMap.access$1400(this.this$0) != this.expectedModCount) {
- throw new ConcurrentModificationException();
- } else {
- this.lastReturned = this.next;
- this.next = TreeMap.access$200(this.this$0, this.next);
- return this.type == 0 ? this.lastReturned.key : (this.type == 1 ? this.lastReturned.value : this.lastReturned);
- }
- }
-
- public void remove() {
- if (this.lastReturned == null) {
- throw new IllegalStateException();
- } else if (TreeMap.access$1400(this.this$0) != this.expectedModCount) {
- throw new ConcurrentModificationException();
- } else {
- TreeMap.access$400(this.this$0, this.lastReturned);
- ++this.expectedModCount;
- this.lastReturned = null;
- }
- }
- }
-