[CLEANUP] Reformatted code

This commit is contained in:
JKetelaar
2017-08-29 00:19:17 +02:00
parent d3541f795b
commit bcb0ddfab7
120 changed files with 6073 additions and 6255 deletions
@@ -20,19 +20,19 @@ import java.util.Collection;
*/
public class Script implements Runnable {
public static final int TYPE_STRATEGY = 0;
public static final int TYPE_LOOP = 1;
public static final int TYPE_OTHER = 2;
public static final int TYPE_LOOP = 1;
public static final int TYPE_OTHER = 2;
public static final int STATE_RUNNING = 0;
public static final int STATE_PAUSE = 1;
public static final int STATE_PAUSE = 1;
public static final int STATE_STOPPED = 2;
private Collection<Strategy> strategies;
private PBPreferences preferences;
private AbstractFramework frameWork;
private int state;
private int frameWorkType;
private int scriptID;
private PBPreferences preferences;
private AbstractFramework frameWork;
private int state;
private int frameWorkType;
private int scriptID;
public boolean onExecute() {
return true;
@@ -141,6 +141,7 @@ public class Script implements Runnable {
*
* @param conn the condition.
* @param timeout the time in miliseconds before it stops sleeping.
*
* @return whether it ran successfully without timing out.
*/
@Deprecated
@@ -148,18 +149,6 @@ public class Script implements Runnable {
return Time.sleep(conn, timeout);
}
/**
* Sets the script's state
*
* @param state
*/
public final void setState(final int state) {
if (state < 0 || state > 2) {
throw new IllegalArgumentException("Illegal state");
}
this.state = state;
}
/**
* Sleeps for an amount of milliseconds
*
@@ -173,6 +162,18 @@ public class Script implements Runnable {
return state;
}
/**
* Sets the script's state
*
* @param state
*/
public final void setState(final int state) {
if (state < 0 || state > 2) {
throw new IllegalArgumentException("Illegal state");
}
this.state = state;
}
public PBPreferences getPreferences() {
if (this.preferences == null) {
this.preferences = new PBPreferences(scriptID);