接口 Stack<T>
-
- 类型参数:
T- The type of things stored in the stack
- 所有已知实现类:
SingletonStack,StandardStack
public interface Stack<T>Stack implementation exposing useful methods for Hibernate needs.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidclear()Remove all elements from the stackintdepth()How many elements are currently on the stack?<X> XfindCurrentFirst(Function<T,X> action)Find an element on the stack and return a value.TgetCurrent()The element currently at the top of the stackTgetPrevious()The element previously at the top of the stack before the current onebooleanisEmpty()Are there no elements currently in the stack?Tpop()Pop (remove and return) the current element off the stackvoidpush(T newCurrent)Push the new element on the top of the stackvoidvisitCurrentFirst(Consumer<T> action)Visit all elements in the stack, starting with the current and working back
-
-
-
方法详细资料
-
push
void push(T newCurrent)
Push the new element on the top of the stack
-
pop
T pop()
Pop (remove and return) the current element off the stack
-
getCurrent
T getCurrent()
The element currently at the top of the stack
-
getPrevious
T getPrevious()
The element previously at the top of the stack before the current one
-
depth
int depth()
How many elements are currently on the stack?
-
isEmpty
boolean isEmpty()
Are there no elements currently in the stack?
-
clear
void clear()
Remove all elements from the stack
-
visitCurrentFirst
void visitCurrentFirst(Consumer<T> action)
Visit all elements in the stack, starting with the current and working back
-
-