org.vizzini.util
Class Stack

java.lang.Object
  extended by org.vizzini.util.Stack
All Implemented Interfaces:
IStack

public class Stack
extends Object
implements IStack

Provides a stack implementation based upon a java.util.Stack.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
Stack()
           
 
Method Summary
 void clear()
          Clear this collection.
 Object get(int index)
          Return the object at the given index.
 boolean isEmpty()
          Return true if this collection is empty.
 Object peek()
          Looks at the object at the top of this stack without removing it from the stack.
 Object pop()
          Removes the object at the top of this stack and returns that object as the value of this function.
 void push(Object item)
          Pushes an item onto the top of this stack.
 int size()
          Return the size of this collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stack

public Stack()
Method Detail

clear

public void clear()
Clear this collection.

Specified by:
clear in interface IStack
Since:
v0.3

get

public Object get(int index)
Return the object at the given index.

Specified by:
get in interface IStack
Since:
v0.3

isEmpty

public boolean isEmpty()
Return true if this collection is empty.

Specified by:
isEmpty in interface IStack
Since:
v0.3

peek

public Object peek()
Looks at the object at the top of this stack without removing it from the stack.

Specified by:
peek in interface IStack
Since:
v0.3

pop

public Object pop()
Removes the object at the top of this stack and returns that object as the value of this function.

Specified by:
pop in interface IStack
Since:
v0.3

push

public void push(Object item)
Pushes an item onto the top of this stack.

Specified by:
push in interface IStack
Since:
v0.3

size

public int size()
Return the size of this collection.

Specified by:
size in interface IStack
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02