This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 public class Object {
2     public int cachedCode; //first field has to be a primitive
3     public boolean cachedHash;
4
5     public native int nativehashCode();
6
7     public int hashCode() {
8         if (!cachedHash) {
9             cachedCode=nativehashCode();
10             cachedHash=true;
11         }
12         return cachedCode;
13     }
14
15     /* DON'T USE THIS METHOD UNLESS NECESSARY */
16     /* WE WILL DEPRECATE IT AS SOON AS INSTANCEOF WORKS */
17     public native int getType();
18
19     public String toString() {
20         return "Object"+hashCode();
21     }
22
23     public boolean equals(Object o) {
24         if (o==this)
25             return true;
26         return false;
27     }
28 }