mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-10-02 10:27:17 +00:00
Added comments to most classes
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
package org.parabot.environment.scripts.framework;
|
||||
|
||||
/**
|
||||
*
|
||||
* Abstract framework for a script
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractFramework {
|
||||
|
||||
public abstract boolean execute();
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
package org.parabot.environment.scripts.framework;
|
||||
|
||||
/**
|
||||
*
|
||||
* A LoopTask interface is used to keep calling the loop method which should return the sleep time
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
*/
|
||||
public interface LoopTask {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return sleepTime in ms
|
||||
*/
|
||||
public int loop();
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,12 @@ package org.parabot.environment.scripts.framework;
|
||||
|
||||
import org.parabot.environment.scripts.Script;
|
||||
|
||||
/**
|
||||
* Jython script, only supports a loop
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
*/
|
||||
public abstract class PythonScript extends Script {
|
||||
|
||||
public abstract int loop();
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
package org.parabot.environment.scripts.framework;
|
||||
|
||||
/**
|
||||
* Keeps sleeping till a condition is valid
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
*/
|
||||
public interface SleepCondition {
|
||||
|
||||
/**
|
||||
* Determine if condition is valid
|
||||
* @return <b>true</b> if valid, otherwise <b>false</b>.
|
||||
*/
|
||||
public boolean isValid();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
package org.parabot.environment.scripts.framework;
|
||||
|
||||
/**
|
||||
* Strategy framework for scripts
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
*/
|
||||
public interface Strategy {
|
||||
|
||||
/**
|
||||
* Whether to activate this strategy
|
||||
* @return <b>true</b> if this strategy should be executed, otherwise <b>false</b>.
|
||||
*/
|
||||
public boolean activate();
|
||||
|
||||
/**
|
||||
* Executes this strategy
|
||||
*/
|
||||
public void execute();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user