home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- import java.lang.ref.SoftReference;
- import java.util.Iterator;
- import java.util.Map;
- import java.util.NoSuchElementException;
- import sun.misc.SoftCache.EntrySet;
-
- class SoftCache$1 implements Iterator {
- Iterator hashIterator;
- SoftCache.Entry next;
- // $FF: synthetic field
- private final SoftCache.EntrySet this$1;
-
- SoftCache$1(SoftCache.EntrySet var1) {
- this.this$1 = var1;
- this.hashIterator = this.this$1.hashEntries.iterator();
- this.next = null;
- }
-
- public boolean hasNext() {
- while(this.hashIterator.hasNext()) {
- Map.Entry var1 = (Map.Entry)this.hashIterator.next();
- SoftCache.ValueCell var2 = (SoftCache.ValueCell)var1.getValue();
- Object var3 = null;
- if (var2 == null || (var3 = ((SoftReference)var2).get()) != null) {
- this.next = new SoftCache.Entry(EntrySet.access$800(this.this$1), var1, var3);
- return true;
- }
- }
-
- return false;
- }
-
- public Object next() {
- if (this.next == null && !this.hasNext()) {
- throw new NoSuchElementException();
- } else {
- SoftCache.Entry var1 = this.next;
- this.next = null;
- return var1;
- }
- }
-
- public void remove() {
- this.hashIterator.remove();
- }
- }
-