home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / 1&1 / java.z / java_301 / java / lang / Object.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-10-20  |  1.3 KB  |  39 lines

  1. package java.lang;
  2.  
  3. public class Object {
  4.    public final native Class getClass();
  5.  
  6.    public native int hashCode();
  7.  
  8.    public boolean equals(Object obj) {
  9.       return this == obj;
  10.    }
  11.  
  12.    protected native Object clone() throws CloneNotSupportedException;
  13.  
  14.    public String toString() {
  15.       return this.getClass().getName() + "@" + Integer.toHexString(this.hashCode());
  16.    }
  17.  
  18.    public final native void notify();
  19.  
  20.    public final native void notifyAll();
  21.  
  22.    public final native void wait(long var1) throws InterruptedException;
  23.  
  24.    public final void wait(long timeout, int nanos) throws InterruptedException {
  25.       if (nanos >= 500000 || nanos != 0 && timeout == 0L) {
  26.          ++timeout;
  27.       }
  28.  
  29.       this.wait(timeout);
  30.    }
  31.  
  32.    public final void wait() throws InterruptedException {
  33.       this.wait(0L);
  34.    }
  35.  
  36.    protected void finalize() throws Throwable {
  37.    }
  38. }
  39.