Package org.opencms.util
Class CmsThreadLocalStack<T>
java.lang.Object
org.opencms.util.CmsThreadLocalStack<T>
- Type Parameters:
T
- the type for the stack elements
Thread local stack.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CmsThreadLocalStack
public CmsThreadLocalStack()
-
-
Method Details
-
pop
Removes and returns the last element pushed onto the stack.- Returns:
- the last element pushed onto the stack
-
push
Pushes a new element onto the stack.- Parameters:
data
- the element to push on the stack
-
size
Returns the current stack size.- Returns:
- the current stack size
-
top
Returns the current top of the stack, without removing it.If the stack is empty, null is returned.
- Returns:
- the current top of the stack
-