/** * Gets the operands for this operator from the stack */ public void getOperands(Stack s) { // parameters are in the correct order, god damn them ParseItem[] items = new ParseItem[arguments]; for (int i = arguments - 1; i >= 0 ; i--) { ParseItem pi = (ParseItem) s.pop(); items[i] = pi; } for (int i = 0 ; i < arguments; i++) { add(items[i]); } }
/** * Gets the operands for this operator from the stack */ public void getOperands(Stack s) { // parameters are in the correct order, god damn them ParseItem[] items = new ParseItem[arguments]; for (int i = arguments - 1; i >= 0 ; i--) { ParseItem pi = (ParseItem) s.pop(); items[i] = pi; } for (int i = 0 ; i < arguments; i++) { add(items[i]); } }