public class CodeThread
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
CodeThread()
Creates a CodeThread.
|
CodeThread(boolean l)
Creates a CodeThread.
|
CodeThread(boolean l,
java.lang.Runnable r)
Creates a CodeThread that will run r (possibly repeatedly).
|
CodeThread(java.lang.Runnable r)
Creates a CodeThread that will repeatedly run r.
|
Modifier and Type | Method and Description |
---|---|
void |
code()
Override this with what code you want to run in the thread.
|
boolean |
isRunning()
Returns whether or not this CodeThread is currently running.
|
void |
run()
Don't touch this, we take care of it.
|
CodeThread |
setName(java.lang.String name)
Sets the name of this CodeThread.
|
void |
start()
Start this
CodeThread |
void |
stop()
Stop execution of this
CodeThread |
public CodeThread()
public CodeThread(java.lang.Runnable r)
r
- The code to be repeatedly.public CodeThread(boolean l)
l
- If the CodeThread will loop.public CodeThread(boolean l, java.lang.Runnable r)
r
- The code to be run.public void start()
CodeThread
public void run()
run
in interface java.lang.Runnable
public void code()
public void stop()
CodeThread
public boolean isRunning()
public CodeThread setName(java.lang.String name)
name
- The name.