public class RuntimeState
extends java.lang.Object
| Constructor and Description |
|---|
RuntimeState()
Constructs the RuntimeState in UNKNOWN state.
|
RuntimeState(State initState)
Constructs the RuntimeState in the given state.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(State compareState)
Used to compare this RuntimeState Object with a State Object.
|
State |
getState()
Returns the state of the Object.
|
void |
setState(State newState)
Sets the state of the Object.
|
java.lang.String |
toString()
Returns the String representation of the current state.
|
void |
waitUntil(State waitState)
Causes the current Thread to wait until the current state
equals the "waitState".
|
void |
waitWhile(State waitState)
Causes the current Thread to wait while the current state equals
the "waitState".
|
public RuntimeState()
public RuntimeState(State initState)
initState - Initial state of the Object.public void setState(State newState)
newState - New Object Statepublic State getState()
public boolean equals(State compareState)
compareState - State to check for equality.public void waitUntil(State waitState) throws java.lang.InterruptedException
waitState - State to wait until.java.lang.InterruptedExceptionpublic void waitWhile(State waitState) throws java.lang.InterruptedException
waitState - State to wait during.java.lang.InterruptedExceptionpublic java.lang.String toString()
toString in class java.lang.Object