home *** CD-ROM | disk | FTP | other *** search
- package sheet;
-
- import java.util.EmptyStackException;
-
- class CellCalc$IntegerStack {
- private short[] data;
- private short top;
-
- private CellCalc$IntegerStack() {
- this.data = new short[10];
- this.top = 0;
- }
-
- public void clear() {
- this.top = 0;
- }
-
- public boolean isEmpty() {
- return this.top == 0;
- }
-
- public void push(short var1) throws IllegalArgumentException {
- if (this.top < this.data.length) {
- short[] var10000 = this.data;
- short var10003 = this.top;
- this.top = (short)(var10003 + 1);
- var10000[var10003] = var1;
- } else {
- throw new IllegalArgumentException("Too complex expression");
- }
- }
-
- public short pop() throws EmptyStackException {
- if (this.top > 0) {
- return this.data[--this.top];
- } else {
- throw new EmptyStackException();
- }
- }
-
- CellCalc$IntegerStack(CellCalc.1 var1) {
- this();
- }
- }
-