public class ExpiringStack
extends java.lang.Object
implements java.io.Serializable
| 构造器和说明 |
|---|
ExpiringStack()
Construct a new, empty stack.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clears this stack.
|
void |
expireBefore(long time) |
java.lang.Object |
first()
Returns the first element of the stack.
|
boolean |
isEmpty()
Returns
true if the stack is empty. |
java.lang.Object |
last() |
java.lang.Object |
pop()
Pops from this stack.
|
void |
push(java.lang.Object obj)
Push into this stack.
|
void |
remove(java.lang.Object o) |
int |
size()
Returns the number of elements in the stack.
|
public void clear()
public java.lang.Object pop()
null, if this stack is empty or the element is
really null.public void push(java.lang.Object obj)
public void remove(java.lang.Object o)
public void expireBefore(long time)
public java.lang.Object first()
null, if the stack is empty, or the element is
really null.public java.lang.Object last()
public boolean isEmpty()
true if the stack is empty.public int size()