|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.util.FastStack
public final class FastStack
A very simple unsynchronized stack. This one is faster than the java.util-Version.
Constructor Summary | |
---|---|
FastStack()
Creates a new empty stack. |
|
FastStack(int size)
Creates a new empty stack with the specified initial storage size. |
Method Summary | |
---|---|
void |
clear()
Clears the stack. |
java.lang.Object |
clone()
Returns a clone of the stack. |
java.lang.Object |
get(int index)
Returns the item at the specified slot in the stack. |
boolean |
isEmpty()
Returns true if the stack is empty, and false
otherwise. |
java.lang.Object |
peek()
Returns the object at the top of the stack without removing it. |
java.lang.Object |
pop()
Removes and returns the object from the top of the stack. |
void |
push(java.lang.Object o)
Pushes an object onto the stack. |
int |
size()
Returns the number of elements in the stack. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastStack()
public FastStack(int size)
size
- the initial storage elements.Method Detail |
---|
public boolean isEmpty()
true
if the stack is empty, and false
otherwise.
public int size()
public void push(java.lang.Object o)
o
- the object.public java.lang.Object peek()
public java.lang.Object pop()
public java.lang.Object clone()
clone
in class java.lang.Object
public void clear()
public java.lang.Object get(int index)
index
- the index.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |