⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stackframe.java

📁 一个基于J2ME的SCRIPT引擎框架
💻 JAVA
字号:
package sjg.scripting;import java.util.*;/** * Program stack for script. * * @author Christian Hvid */public class StackFrame {    private Script script;    private int count = 0;    private int wait = 0;    private int programCounter = 0;    private Command currentCommand;    public void newTick() {        count++;    }    public boolean hasNext() {        return // false is we are waiting && false if we are out of commands                ((wait <= count) && (programCounter < script.size()));    }    public Command next() {        currentCommand = script.getCommand(programCounter);        if (currentCommand instanceof Wait) {            count = 0;            wait = ((Wait) currentCommand).getWait();        }        programCounter++;        return currentCommand;    }    public boolean isFinished() {        return (programCounter >= script.size());    }    public Script getScript() {        return script;    }    public StackFrame(Script script) {        this.script = script;        programCounter = 0;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -