40 * IdentityHashtable is a modified copy of the 1.1.6 Hashtable class which |
40 * IdentityHashtable is a modified copy of the 1.1.6 Hashtable class which |
41 * does not rely on the hashCode() and equals() methods of the key or value; |
41 * does not rely on the hashCode() and equals() methods of the key or value; |
42 * instead, it uses the System.identityHashcode() method and pointer comparison. |
42 * instead, it uses the System.identityHashcode() method and pointer comparison. |
43 * In addition, all synchronization has been removed. |
43 * In addition, all synchronization has been removed. |
44 */ |
44 */ |
45 /** |
|
46 * IdentityHashtable collision list. |
|
47 */ |
|
48 class IdentityHashtableEntry { |
|
49 int hash; |
|
50 Object key; |
|
51 Object value; |
|
52 IdentityHashtableEntry next; |
|
53 } |
|
54 |
|
55 public final class IdentityHashtable extends Dictionary { |
45 public final class IdentityHashtable extends Dictionary { |
56 /** |
46 /** |
57 * The hash table data. |
47 * The hash table data. |
58 */ |
48 */ |
59 private transient IdentityHashtableEntry table[]; |
49 private transient IdentityHashtableEntry table[]; |