(int v)
| 18 | } |
| 19 | |
| 20 | public void push(int v) { |
| 21 | Stack last = getLastStack(); |
| 22 | if (last != null && !last.isFull()) { // add to last |
| 23 | last.push(v); |
| 24 | } else { // must create new stack |
| 25 | Stack stack = new Stack(capacity); |
| 26 | stack.push(v); |
| 27 | stacks.add(stack); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | public int pop() { |
| 32 | Stack last = getLastStack(); |
no test coverage detected