Package org.opencms.util
Class CmsThreadLocalStack<T>
- java.lang.Object
-
- org.opencms.util.CmsThreadLocalStack<T>
-
- Type Parameters:
T
- the type for the stack elements
public class CmsThreadLocalStack<T> extends java.lang.Object
Thread local stack.
-
-
Constructor Summary
Constructors Constructor Description CmsThreadLocalStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
pop()
Removes and returns the last element pushed onto the stack.void
push(T data)
Pushes a new element onto the stack.int
size()
Returns the current stack size.T
top()
Returns the current top of the stack, without removing it.
-
-
-
Constructor Detail
-
CmsThreadLocalStack
public CmsThreadLocalStack()
-
-
Method Detail
-
pop
public T pop()
Removes and returns the last element pushed onto the stack.- Returns:
- the last element pushed onto the stack
-
push
public void push(T data)
Pushes a new element onto the stack.- Parameters:
data
- the element to push on the stack
-
size
public int size()
Returns the current stack size.- Returns:
- the current stack size
-
-