Class FastStack
java.lang.Object
org.jfree.util.FastStack
- All Implemented Interfaces:
Serializable, Cloneable
A very simple unsynchronized stack. This one is faster than the
java.util-Version.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the stack.clone()Returns a clone of the stack.get(int index) Returns the item at the specified slot in the stack.booleanisEmpty()Returnstrueif the stack is empty, andfalseotherwise.peek()Returns the object at the top of the stack without removing it.pop()Removes and returns the object from the top of the stack.voidPushes an object onto the stack.intsize()Returns the number of elements in the stack.
-
Constructor Details
-
FastStack
public FastStack()Creates a new empty stack. -
FastStack
Creates a new empty stack with the specified initial storage size.- Parameters:
size- the initial storage elements.
-
-
Method Details
-
isEmpty
Returnstrueif the stack is empty, andfalseotherwise.- Returns:
- A boolean.
-
size
-
push
-
peek
-
pop
-
clone
-
clear
Clears the stack. -
get
-