home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / util / WeakHashMap$EntrySet.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.7 KB  |  72 lines

  1. package java.util;
  2.  
  3. import java.util.WeakHashMap.WeakKey;
  4.  
  5. class WeakHashMap$EntrySet extends AbstractSet {
  6.    Set hashEntrySet;
  7.    // $FF: synthetic field
  8.    private final WeakHashMap this$0;
  9.  
  10.    private WeakHashMap$EntrySet(WeakHashMap var1) {
  11.       this.this$0 = var1;
  12.       this.hashEntrySet = WeakHashMap.access$200(this.this$0).entrySet();
  13.    }
  14.  
  15.    public Iterator iterator() {
  16.       return new WeakHashMap.1(this);
  17.    }
  18.  
  19.    public boolean isEmpty() {
  20.       return !this.iterator().hasNext();
  21.    }
  22.  
  23.    public int size() {
  24.       int var1 = 0;
  25.       Iterator var2 = this.iterator();
  26.  
  27.       while(var2.hasNext()) {
  28.          ++var1;
  29.          var2.next();
  30.       }
  31.  
  32.       return var1;
  33.    }
  34.  
  35.    public boolean remove(Object var1) {
  36.       WeakHashMap.access$300(this.this$0);
  37.       if (!(var1 instanceof Map.Entry)) {
  38.          return false;
  39.       } else {
  40.          Map.Entry var2 = (Map.Entry)var1;
  41.          Object var3 = var2.getValue();
  42.          WeakHashMap.WeakKey var4 = WeakKey.access$000(var2.getKey());
  43.          Object var5 = WeakHashMap.access$200(this.this$0).get(var4);
  44.          if (var5 == null ? var3 == null && WeakHashMap.access$200(this.this$0).containsKey(var4) : var5.equals(var3)) {
  45.             WeakHashMap.access$200(this.this$0).remove(var4);
  46.             return true;
  47.          } else {
  48.             return false;
  49.          }
  50.       }
  51.    }
  52.  
  53.    public int hashCode() {
  54.       int var1 = 0;
  55.  
  56.       for(Map.Entry var3 : this.hashEntrySet) {
  57.          WeakHashMap.WeakKey var4 = (WeakHashMap.WeakKey)var3.getKey();
  58.          if (var4 != null) {
  59.             Object var5;
  60.             var1 += var4.hashCode() ^ ((var5 = var3.getValue()) == null ? 0 : var5.hashCode());
  61.          }
  62.       }
  63.  
  64.       return var1;
  65.    }
  66.  
  67.    // $FF: synthetic method
  68.    WeakHashMap$EntrySet(WeakHashMap var1, WeakHashMap.1 var2) {
  69.       this(var1);
  70.    }
  71. }
  72.