栈空间 [计] stack space ; searching the stack
堆栈空间 stack space
环境栈空间 Environment stack space
中断模式堆栈空间 IrqStackSpace SPACE IRQ_STACK_LEGTH
管理模式堆栈空间 SvcStackSpace SPACE SVC_STACK_LEGTH
中止义模式堆栈空间 AbtStackSpace SPACE ABT_STACK_LEGTH
栈空接受 acceptance by empty stack
快速中断模式堆栈空间 FiqStackSpace SPACE FIQ_STACK_LEGTH
判栈空 StackEmpty
现在我可以为pop方法编写行为,即确保当栈在逻辑上为空时,抛出一个异常。
Now I can code the behavior for the pop method, which ensures that if the stack is logically empty, an exception will be thrown.
如果再次调用pop,那么应该返回foo,然后栈为空(假设在添加这两个对象之前栈中没有对象)。
If you called pop again, then foo should be returned and the stack should be empty (assuming there wasn't anything in it before you added the two objects).
在这种情况下,如果push没有被调用(或者从逻辑上讲,栈为空)的情况下确保pop抛出一个异常,则意味着栈有一个状态。
In this case, ensuring that pop throws an exception if push hasn't been called (or logically, if the stack is empty) means that the stack has a state.
应用推荐