extendStack method

void extendStack (int argSize)

Implementation

void extendStack(int argSize) {
  List<E> newStack = newArray(argSize);
  if (_stack != null) {
    BufferUtils.arraycopy(_stack, 0, newStack, 0, _size);
  }
  for (int i = 0; i < newStack.length; i++) {
    newStack[i] = newInstance();
  }
  _stack = newStack;
  _size = newStack.length;
}