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 / HashMap$Entry.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  51 lines

  1. package java.util;
  2.  
  3. class HashMap$Entry implements Map.Entry {
  4.    int hash;
  5.    Object key;
  6.    Object value;
  7.    HashMap$Entry next;
  8.  
  9.    HashMap$Entry(int var1, Object var2, Object var3, HashMap$Entry var4) {
  10.       this.hash = var1;
  11.       this.key = var2;
  12.       this.value = var3;
  13.       this.next = var4;
  14.    }
  15.  
  16.    protected Object clone() {
  17.       return new HashMap$Entry(this.hash, this.key, this.value, this.next == null ? null : (HashMap$Entry)this.next.clone());
  18.    }
  19.  
  20.    public Object getKey() {
  21.       return this.key;
  22.    }
  23.  
  24.    public Object getValue() {
  25.       return this.value;
  26.    }
  27.  
  28.    public Object setValue(Object var1) {
  29.       Object var2 = this.value;
  30.       this.value = var1;
  31.       return var2;
  32.    }
  33.  
  34.    public boolean equals(Object var1) {
  35.       if (!(var1 instanceof Map.Entry)) {
  36.          return false;
  37.       } else {
  38.          Map.Entry var2 = (Map.Entry)var1;
  39.          return (this.key == null ? var2.getKey() == null : this.key.equals(var2.getKey())) && (this.value == null ? var2.getValue() == null : this.value.equals(var2.getValue()));
  40.       }
  41.    }
  42.  
  43.    public int hashCode() {
  44.       return this.hash ^ (this.value == null ? 0 : this.value.hashCode());
  45.    }
  46.  
  47.    public String toString() {
  48.       return this.key + "=" + this.value;
  49.    }
  50. }
  51.