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$Entry.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  972 b   |  42 lines

  1. package java.util;
  2.  
  3. class WeakHashMap$Entry implements Map.Entry {
  4.    private Map.Entry ent;
  5.    private Object key;
  6.  
  7.    WeakHashMap$Entry(Map.Entry var1, Object var2) {
  8.       this.ent = var1;
  9.       this.key = var2;
  10.    }
  11.  
  12.    public Object getKey() {
  13.       return this.key;
  14.    }
  15.  
  16.    public Object getValue() {
  17.       return this.ent.getValue();
  18.    }
  19.  
  20.    public Object setValue(Object var1) {
  21.       return this.ent.setValue(var1);
  22.    }
  23.  
  24.    private static boolean valEquals(Object var0, Object var1) {
  25.       return var0 == null ? var1 == null : var0.equals(var1);
  26.    }
  27.  
  28.    public boolean equals(Object var1) {
  29.       if (!(var1 instanceof Map.Entry)) {
  30.          return false;
  31.       } else {
  32.          Map.Entry var2 = (Map.Entry)var1;
  33.          return valEquals(this.key, var2.getKey()) && valEquals(this.getValue(), var2.getValue());
  34.       }
  35.    }
  36.  
  37.    public int hashCode() {
  38.       Object var1;
  39.       return (this.key == null ? 0 : this.key.hashCode()) ^ ((var1 = this.getValue()) == null ? 0 : var1.hashCode());
  40.    }
  41. }
  42.