[New] Added State.isStopped()

This commit is contained in:
Robert von Burg 2021-08-03 10:23:23 +02:00
parent 2d2072b0c4
commit cbba1b2dfb
1 changed files with 9 additions and 2 deletions

View File

@ -135,6 +135,13 @@ public enum State {
return this == ERROR;
}
/**
* @return true if the state is {@link #STOPPED}
*/
public boolean isStopped() {
return this == STOPPED;
}
/**
* @return true if the state is {@link #EXECUTED}
*/
@ -268,8 +275,8 @@ public enum State {
// execution
if (states.contains(EXECUTABLE) || states.contains(EXECUTION))
return EXECUTION;
if (states.contains(EXECUTED) && (states.contains(CREATED) || states.contains(PLANNING) || states
.contains(PLANNED)))
if (states.contains(EXECUTED) && (states.contains(CREATED) || states.contains(PLANNING) || states.contains(
PLANNED)))
return EXECUTION;
// executed