org.apache.mina.util
Class ExpiringStack
java.lang.Objectorg.apache.mina.util.ExpiringStack
- Serializable
public class ExpiringStack
extends java.lang.Object
implements Serializable
A unbounded stack with expiration.
void | clear()- Clears this stack.
|
void | expireBefore(long time)
|
Object | first()- Returns the first element of the stack.
|
boolean | isEmpty()- Returns
true if the stack is empty.
|
Object | last()
|
Object | pop()- Pops from this stack.
|
void | push(Object obj)- Push into this stack.
|
void | remove(Object o)
|
int | size()- Returns the number of elements in the stack.
|
ExpiringStack
public ExpiringStack()
Construct a new, empty stack.
clear
public void clear()
Clears this stack.
expireBefore
public void expireBefore(long time)
first
public Object first()
Returns the first element of the stack.
null, if the stack is empty, or the element is
really null.
isEmpty
public boolean isEmpty()
Returns true if the stack is empty.
pop
public Object pop()
Pops from this stack.
null, if this stack is empty or the element is
really null.
push
public void push(Object obj)
Push into this stack.
remove
public void remove(Object o)
size
public int size()
Returns the number of elements in the stack.