/*
 * Created on 01/08/2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package sce.stack;

import sce.list.DListImpl;
import sce.list.DNode;
/**
 * @author TOSHIBA
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class Stack {

	private DListImpl storage;

	public Object pop() {
		return this.storage.removeLast();
	}

	public void push(Object parObject) {
		this.storage.insertLast(parObject);
	}

	public Object peek() {
		return this.storage.getLast().getContent();
	}

	public int getSize() {
		return this.storage.getSize();
	}

	public boolean isEmpty() {
		return this.storage.isEmpty();
	}

	public Stack() {
		this.storage = new DListImpl();
	}

}