home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / HashMap$Entry.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.6 KB  |  63 lines

  1. package java.util;
  2.  
  3. class HashMap$Entry<K, V> implements Map.Entry<K, V> {
  4.    final K key;
  5.    V value;
  6.    HashMap$Entry<K, V> next;
  7.    final int hash;
  8.  
  9.    HashMap$Entry(int var1, K var2, V var3, HashMap$Entry<K, V> var4) {
  10.       this.value = var3;
  11.       this.next = var4;
  12.       this.key = var2;
  13.       this.hash = var1;
  14.    }
  15.  
  16.    public final K getKey() {
  17.       return this.key;
  18.    }
  19.  
  20.    public final V getValue() {
  21.       return this.value;
  22.    }
  23.  
  24.    public final V setValue(V var1) {
  25.       Object var2 = this.value;
  26.       this.value = var1;
  27.       return (V)var2;
  28.    }
  29.  
  30.    public final boolean equals(Object var1) {
  31.       if (!(var1 instanceof Map.Entry)) {
  32.          return false;
  33.       } else {
  34.          Map.Entry var2 = (Map.Entry)var1;
  35.          Object var3 = this.getKey();
  36.          Object var4 = var2.getKey();
  37.          if (var3 == var4 || var3 != null && var3.equals(var4)) {
  38.             Object var5 = this.getValue();
  39.             Object var6 = var2.getValue();
  40.             if (var5 == var6 || var5 != null && var5.equals(var6)) {
  41.                return true;
  42.             }
  43.          }
  44.  
  45.          return false;
  46.       }
  47.    }
  48.  
  49.    public final int hashCode() {
  50.       return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());
  51.    }
  52.  
  53.    public final String toString() {
  54.       return this.getKey() + "=" + this.getValue();
  55.    }
  56.  
  57.    void recordAccess(HashMap<K, V> var1) {
  58.    }
  59.  
  60.    void recordRemoval(HashMap<K, V> var1) {
  61.    }
  62. }
  63.