home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / misc / SoftCache$EntrySet$1.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.2 KB  |  51 lines

  1. package sun.misc;
  2.  
  3. import java.util.Iterator;
  4. import java.util.Map;
  5. import java.util.NoSuchElementException;
  6.  
  7. final class SoftCache$EntrySet$1 implements Iterator {
  8.    Iterator hashIterator;
  9.    SoftCache.Entry next;
  10.    // $FF: synthetic field
  11.    final SoftCache.EntrySet this$1;
  12.  
  13.    SoftCache$EntrySet$1(SoftCache.EntrySet var1) {
  14.       this.this$1 = var1;
  15.       this.hashIterator = this.this$1.hashEntries.iterator();
  16.       this.next = null;
  17.    }
  18.  
  19.    public boolean hasNext() {
  20.       while(true) {
  21.          if (this.hashIterator.hasNext()) {
  22.             Map.Entry var1 = (Map.Entry)this.hashIterator.next();
  23.             SoftCache.ValueCell var2 = (SoftCache.ValueCell)var1.getValue();
  24.             Object var3 = null;
  25.             if (var2 != null && (var3 = var2.get()) == null) {
  26.                continue;
  27.             }
  28.  
  29.             this.next = new SoftCache.Entry(this.this$1.this$0, var1, var3);
  30.             return true;
  31.          }
  32.  
  33.          return false;
  34.       }
  35.    }
  36.  
  37.    public Object next() {
  38.       if (this.next == null && !this.hasNext()) {
  39.          throw new NoSuchElementException();
  40.       } else {
  41.          SoftCache.Entry var1 = this.next;
  42.          this.next = null;
  43.          return var1;
  44.       }
  45.    }
  46.  
  47.    public void remove() {
  48.       this.hashIterator.remove();
  49.    }
  50. }
  51.