public class Object
Constructor and Description |
---|
Object()
Constructs a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
clone()
Answers a new instance of the same class as the receiver,
whose slots have been filled in with the values in the
slots of the receiver.
|
boolean |
equals(Object o)
Compares the argument to the receiver, and answers true
if they represent the same object using a class
specific comparison.
|
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak)
references to the receiver.
|
Class<? extends Object> |
getClass()
Answers the unique instance of java.lang.Class which
represents the class of the receiver.
|
int |
hashCode()
Answers an integer hash code for the receiver.
|
void |
notify()
Causes one thread which is
wait ing on the
receiver to be made ready to run. |
void |
notifyAll()
Causes all threads which are
wait ing on the
receiver to be made ready to run. |
String |
toString()
Answers a string containing a concise, human-readable
description of the receiver.
|
void |
wait()
Causes the thread which sent this message to be made not
ready to run pending some change in the receiver (as
indicated by
notify or notifyAll ). |
void |
wait(long time)
Causes the thread which sent this message to be made not
ready to run either pending some change in the receiver
(as indicated by
notify or notifyAll )
or the expiration of the timeout. |
void |
wait(long time,
int frac)
Causes the thread which sent this message to be made not
ready to run either pending some change in the receiver
(as indicated by
notify or notifyAll )
or the expiration of the timeout. |
protected Object clone() throws CloneNotSupportedException
Classes which wish to support cloning must specify that they implement the Cloneable interface, since the native implementation checks for this.
CloneNotSupportedException
- if the receiver's class does not implement
the interface Cloneable.public boolean equals(Object o)
o
- Object
the object to compare with this object.true
if the object is the same as this object
false
if it is different from this object.hashCode()
protected void finalize() throws Throwable
Note: The virtual machine assumes that the implementation in class Object is empty.
Throwable
- The virtual machine ignores any exceptions
which are thrown during finalization.public final Class<? extends Object> getClass()
public int hashCode()
true
when passed to
.equals
must answer the same value for this
method.equals(java.lang.Object)
public final void notify()
wait
ing on the
receiver to be made ready to run. This does not guarantee
that the thread will immediately run. The method can only
be invoked by a thread which owns the receiver's monitor.notifyAll()
,
wait()
,
wait(long)
,
wait(long,int)
,
Thread
public final void notifyAll()
wait
ing on the
receiver to be made ready to run. The threads are scheduled
according to their priorities as specified in class Thread.
Between any two threads of the same priority the one which
waited first will be the first thread that runs after
being notified. The method can only be invoked by a thread
which owns the receiver's monitor.notify()
,
wait()
,
wait(long)
,
wait(long,int)
,
Thread
public String toString()
public final void wait() throws InterruptedException
notify
or notifyAll
).
The method can only be invoked by a thread which owns the
receiver's monitor. A waiting thread can be sent
interrupt()
to cause it to prematurely stop
waiting, so senders of wait should check that the condition
they were waiting for has been met.
When the thread waits, it gives up ownership of the receiver's monitor. When it is notified (or interrupted) it re-acquires the monitor before it starts running.
InterruptedException
- to interrupt the wait.Thread.interrupt()
,
notify()
,
notifyAll()
,
wait(long)
,
wait(long,int)
,
Thread
public final void wait(long time) throws InterruptedException
notify
or notifyAll
)
or the expiration of the timeout. The method can only be invoked
by a thread which owns the receiver's monitor. A waiting thread
can be sent interrupt()
to cause it to prematurely
stop waiting, so senders of wait should check that the condition
they were waiting for has been met.
When the thread waits, it gives up ownership of the receiver's monitor. When it is notified (or interrupted) it re-acquires the monitor before it starts running.
time
- long
The maximum time to wait in milliseconds.InterruptedException
- to interrupt the wait.notify()
,
notifyAll()
,
wait()
,
wait(long,int)
,
Thread
public final void wait(long time, int frac) throws InterruptedException
notify
or notifyAll
)
or the expiration of the timeout. The method can only be invoked
by a thread which owns the receiver's monitor. A waiting thread
can be sent interrupt()
to cause it to prematurely
stop waiting, so senders of wait should check that the condition
they were waiting for has been met.
When the thread waits, it gives up ownership of the receiver's monitor. When it is notified (or interrupted) it re-acquires the monitor before it starts running.
time
- long
The maximum time to wait in milliseconds.frac
- int
The fraction of a mSec to wait, specified
in nano seconds.InterruptedException
- to interrupt the wait.notify()
,
notifyAll()
,
wait()
,
wait(long)
,
Thread
Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.