/** * Creates a new instance of this class and initializes its * {@link JiffleFunctions} and {@link IntegerStack} objects. */ public AbstractJiffleRuntime(String[] variableNames) { _FN = new JiffleFunctions(); _stk = new IntegerStack(); _xres = Double.NaN; _yres = Double.NaN; _variableNames = variableNames; }
/** * Push a value onto the stack. * @param x the value * @return the value */ public synchronized Integer push(Integer x) { if (++index == data.length) { grow(); } data[index] = x; return x; }
/** * Creates a new instance of this class and initializes its * {@link JiffleFunctions} and {@link IntegerStack} objects. */ public AbstractJiffleRuntime(String[] variableNames) { _FN = new JiffleFunctions(); _stk = new IntegerStack(); _xres = Double.NaN; _yres = Double.NaN; _variableNames = variableNames; }
/** * Push a value onto the stack. * @param x the value * @return the value */ public synchronized Integer push(Integer x) { if (++index == data.length) { grow(); } data[index] = x; return x; }
@Before public void setup() { stk = new IntegerStack(); }