jodd.util.collection
Class SimpleStack<E>

java.lang.Object
  extended by jodd.util.collection.SimpleStack<E>

public class SimpleStack<E>
extends java.lang.Object

Simple Stack (LIFO) class.


Constructor Summary
SimpleStack()
           
 
Method Summary
 boolean isEmpty()
          Is stack empty?
 E peek()
          Peek element from stack.
 E pop()
          Stack pop.
 java.lang.Object[] popAll()
           
 void push(E o)
          Stack push.
 int size()
          Returns stack size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleStack

public SimpleStack()
Method Detail

push

public void push(E o)
Stack push.


pop

public E pop()
Stack pop.

Returns:
poped object from stack

popAll

public java.lang.Object[] popAll()

peek

public E peek()
Peek element from stack.

Returns:
peeked object

isEmpty

public boolean isEmpty()
Is stack empty?

Returns:
true if stack is empty

size

public int size()
Returns stack size.

Returns:
stack size


Copyright ©2008 Jodd Team