clean up math.java a little...standardize things to the actual Java class library...
[IRC.git] / Robust / src / ClassLibrary / JavaDSM / Object.java
1 public class Object {
2   public int cachedCode;   //first field has to be a primitive
3   public boolean cachedHash;
4   public Object nextobject;   /* Oid */
5   public Object localcopy;
6
7   public native int nativehashCode();
8
9   public int hashCode() {
10     if (!cachedHash) {
11       cachedCode=nativehashCode();
12       cachedHash=true;
13     }
14     return cachedCode;
15   }
16
17   /* DON'T USE THIS METHOD UNLESS NECESSARY */
18   /* WE WILL DEPRECATE IT AS SOON AS INSTANCEOF WORKS */
19   public native int getType();
20
21   public String toString() {
22     return "Object"+hashCode();
23   }
24
25   public boolean equals(Object o) {
26     if (o==this)
27       return true;
28     return false;
29   }
30 }