Modifier and Type | Field and Description |
---|---|
static int |
MAX_PRIORITY
MAX_PRIORITY
|
static int |
MIN_PRIORITY
MIN_PRIORITY
|
static int |
NORM_PRIORITY
NORM_PRIORITY
|
Constructor and Description |
---|
Thread()
Thread
|
Thread(Runnable runnable) |
Thread(Runnable runnable,
String s) |
Thread(String s) |
Thread(ThreadGroup threadgroup,
Runnable runnable) |
Thread(ThreadGroup threadgroup,
Runnable runnable,
String s) |
Thread(ThreadGroup threadgroup,
String s) |
Modifier and Type | Method and Description |
---|---|
static int |
activeCount() |
void |
checkAccess()
checkAccess
|
static Thread |
currentThread() |
static void |
delay(long l) |
void |
destroy()
destroy
|
static void |
dumpStack()
dumpStack
|
static int |
enumerate(Thread[] athread) |
String |
getName() |
int |
getPriority() |
ThreadGroup |
getThreadGroup() |
void |
interrupt()
interrupt
|
static boolean |
interrupted() |
boolean |
isAlive() |
boolean |
isDaemon() |
boolean |
isInterrupted() |
void |
join() |
void |
join(long l) |
void |
join(long l,
int i) |
void |
resume()
resume
|
void |
run()
run
|
void |
setDaemon(boolean flag) |
void |
setName(String s) |
void |
setPriority(int i) |
static void |
sleep(long l) |
static void |
sleep(long l,
int i) |
void |
start()
start
|
void |
stop()
stop
|
void |
stop(Throwable throwable) |
void |
suspend()
suspend
|
String |
toString()
Returns a string representation of the object.
|
static void |
yield()
yield
|
public static final int MIN_PRIORITY
public static final int NORM_PRIORITY
public static final int MAX_PRIORITY
public Thread()
public Thread(Runnable runnable)
runnable
- ?public Thread(String s)
s
- ?public Thread(ThreadGroup threadgroup, Runnable runnable)
threadgroup
- ?runnable
- ?public Thread(ThreadGroup threadgroup, Runnable runnable, String s)
threadgroup
- ?runnable
- ?s
- ?public Thread(ThreadGroup threadgroup, String s)
threadgroup
- ?s
- ?public static int activeCount()
public void checkAccess()
public static Thread currentThread()
public void destroy()
public static void dumpStack()
public static int enumerate(Thread[] athread)
athread
- ?public final String getName()
public final int getPriority()
public final ThreadGroup getThreadGroup()
public void interrupt()
public static boolean interrupted()
public final boolean isAlive()
public final boolean isDaemon()
public boolean isInterrupted()
public final void join() throws InterruptedException
InterruptedException
- ?public final void join(long l) throws InterruptedException
l
- ?InterruptedException
- ?public final void join(long l, int i) throws InterruptedException
l
- ?i
- ?InterruptedException
- ?public final void resume()
public void run()
Runnable
public final void setDaemon(boolean flag)
flag
- ?public final void setName(String s)
s
- ?public final void setPriority(int i)
i
- ?public static void delay(long l) throws InterruptedException
l
- ?InterruptedException
- ?public static void sleep(long l) throws InterruptedException
l
- ?InterruptedException
- ?public static void sleep(long l, int i) throws InterruptedException
l
- ?i
- ?InterruptedException
- ?public void start()
public final void stop()
public final void stop(Throwable throwable)
throwable
- ?public final void suspend()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object.
public static void yield()