datastructures
Class Stack

java.lang.Object
  extended by datastructures.Stack

public class Stack
extends java.lang.Object

My stack implementation.


Constructor Summary
Stack(int m_size)
           
 
Method Summary
 boolean is_empty()
          Returns true if stack empty.
 Node pop()
          Retrieves a node from stack.
 void push(Node n)
          Pushes node to stack.
 int size()
          Returns number of elements in stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stack

public Stack(int m_size)
Method Detail

is_empty

public boolean is_empty()
Returns true if stack empty.

Returns:
boolean

push

public void push(Node n)
Pushes node to stack.

Parameters:
n - node

pop

public Node pop()
Retrieves a node from stack.

Returns:

size

public int size()
Returns number of elements in stack.

Returns:
integer