java.lang
Class Object

java.lang.Object

public class Object

All classes extend this one, implicitly.


Constructor Summary
Object()
           
 
Method Summary
 boolean equals(Object aOther)
           
 Class<?> getClass()
          Returns null.
 int hashCode()
           
 void notify()
          Wake up one thread blocked on a wait().
 void notifyAll()
          Wake up all threads blocked on a wait().
 String toString()
           
 void wait()
          This is the same as calling wait(0).
 void wait(long timeout)
          Wait until notified.
 void wait(long timeout, int nanos)
           
 

Constructor Detail

Object

public Object()
Method Detail

equals

public boolean equals(Object aOther)

getClass

public final Class<?> getClass()
Returns null. It's here to satisfy javac.


hashCode

public int hashCode()

notify

public final void notify()
Wake up one thread blocked on a wait(). Must be synchronized on this object otherwise an IllegalMonitorStateException will be thrown.

If multiple threads are waiting, higher priority threads will be woken in preference, otherwise the thread that gets woken is essentially random.


notifyAll

public final void notifyAll()
Wake up all threads blocked on a wait(). Must be synchronized on this object otherwise an IllegalMonitorStateException will be thrown.


toString

public String toString()

wait

public final void wait()
                throws InterruptedException
This is the same as calling wait(0). TODO make this a Java method that calls wait(0) since native methods are expensive?

Throws:
InterruptedException

wait

public final void wait(long timeout)
                throws InterruptedException
Wait until notified. Must be synchronized on this object otherwise an IllegalMonitorStateException will be thrown. The wait can terminate if one of the following things occurs:
  1. notify() or notifyAll() is called.
  2. The calling thread is interrupted.
  3. The timeout expires.

Parameters:
timeout - maximum time in milliseconds to wait. Zero means forever.
Throws:
InterruptedException

wait

public final void wait(long timeout,
                       int nanos)
                throws InterruptedException
Throws:
InterruptedException