The reason for this is that during execution, a thread can pop any number of references from its stack — references that could have been stored elsewhere during execution.
这样做的原因在于,执行期间线程可以从其栈中弹出任意数量的引用——执行过程中可能存储在其他位置的引用。
It doesn't make sense to have a stack that pushes but doesn't pop, so you test the methods together as part of the contract the stack exposes to its client.
拥有可以推动但不能弹出的堆栈没有任何意义,因此,您可以将这些方法作为堆栈暴露给其客户机的契约的一部分进行测试。
The list of directories ACTS like a stack — you push a directory onto the top of the stack, and pop a directory off the top again to get it back.
该目录列表的行为就像一个堆栈——您将一个目录压入堆栈顶部,并从顶部弹出一个目录以取回它。
If you pop the first item of a list, you have a queue; whereas, if you pop the last item of a list, you have a stack, as shown in Listing 8.
如果弹出list的第一项,则是一个队列;反之,如果弹出list的最后一项,则是一个堆栈,如清单8所示。
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.
在这种情况下,如果push没有被调用(或者从逻辑上讲,栈为空)的情况下确保pop抛出一个异常,则意味着栈有一个状态。
As you navigate through the application you build a stack of activities that you can then pop out of by using the back button on the phone.
当您在应用程序中导航时,就创建了一个活动堆栈,使用手机上的后退按钮就就可从该堆栈中出来。
With this arrangement, even if Thread B has modified the top while Thread a tries to pop, you're sure that no elements in the stack are skipped.
这样,即使线程b在线程A试图弹出数据的同时修改了堆栈顶,也可以确保不会跳过堆栈中的元素。
If you push the Numbers 2, 4, and 6 onto a stack and then pop the stack twice, you will get 6 and 4, in that order.
如果你向堆栈压入数据2,4,6,然后弹出栈两次,你将按照顺序得到6与4。
The plug-in is composed of three functions, a handful of shell options, and an alias for popd that persists the directory stack with each pop operation.
这个插件包含三个函数、几个shell选项和popd的别名(为每个弹出操作保留目录堆栈)。
In the pop method, after the top pointer is decremented, elements still maintains a reference to the object being popped off the stack.
在pop方法中,在顶部指针递减之后,elements仍然会保留对将弹出堆栈的对象的引用。
When the employee close element is parsed, you pop the completed object from the stack, and add it to a List object.
当employeeclose元素被解析时,您将完成的对象弹出Stack,并将其添加到一个List对象。
Arrays respond to push and pop, where push adds an item (at its last spot) and pop removes one (like a stack, from the last position).
Arrays支持push和pop操作,其中push增加项目(在其最后一个位置)而pop移除项目(就像堆栈,从最后一个开始)。
Arrays respond to push and pop, where push adds an item (at its last spot) and pop removes one (like a stack, from the last position).
Arrays支持push和pop操作,其中push增加项目(在其最后一个位置)而pop移除项目(就像堆栈,从最后一个开始)。
应用推荐