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

  1. package java.util;
  2.  
  3. class Hashtable$Entry implements Map.Entry {
  4.    int hash;
  5.    Object key;
  6.    Object value;
  7.    Hashtable$Entry next;
  8.  
  9.    protected Hashtable$Entry(int var1, Object var2, Object var3, Hashtable$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 Hashtable$Entry(this.hash, this.key, this.value, this.next == null ? null : (Hashtable$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.       if (var1 == null) {
  30.          throw new NullPointerException();
  31.       } else {
  32.          Object var2 = this.value;
  33.          this.value = var1;
  34.          return var2;
  35.       }
  36.    }
  37.  
  38.    public boolean equals(Object var1) {
  39.       if (!(var1 instanceof Map.Entry)) {
  40.          return false;
  41.       } else {
  42.          Map.Entry var2 = (Map.Entry)var1;
  43.          return (this.key == null ? var2.getKey() == null : this.key.equals(var2.getKey())) && (this.value == null ? var2.getValue() == null : this.value.equals(var2.getValue()));
  44.       }
  45.    }
  46.  
  47.    public int hashCode() {
  48.       return this.hash ^ (this.value == null ? 0 : this.value.hashCode());
  49.    }
  50.  
  51.    public String toString() {
  52.       return this.key.toString() + "=" + this.value.toString();
  53.    }
  54. }
  55.