remove some codes for scheduling
[IRC.git] / Robust / src / ClassLibrary / ObjectJava.java
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     private Object nextlockobject;
7     private Object prevlockobject;
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 native int MonitorEnter();
22     public native int MonitorExit();
23
24     public String toString() {
25         return "Object"+hashCode();
26     }
27
28     public boolean equals(Object o) {
29         if (o==this)
30             return true;
31         return false;
32     }
33 }