java.lang
Class Object

java.lang.Object

public class Object

All classes extend this one, implicitly.


Constructor Summary
Object()
           
 
Method Summary
protected  Object clone()
          Create a copy of this object, using a shallow copy.
 boolean equals(Object aOther)
           
protected  void finalize()
          Deprecated. not implemented in leJOS
 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

clone

protected Object clone()
                throws CloneNotSupportedException
Create a copy of this object, using a shallow copy.

Returns:
The new copy of the Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object aOther)

finalize

@Deprecated
protected void finalize()
Deprecated. not implemented in leJOS


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