/*
* 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.queue;
import sce.list.DListImpl;
/**
* @author TOSHIBA
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Queue {
private DListImpl storage;
public void enqueue(Object parObject) {
this.storage.insertLast(parObject);
}
public Object dequeue() {
return this.storage.removeFirst();
}
public int getSize() {
return this.storage.getSize();
}
public boolean isEmpty() {
return this.storage.isEmpty();
}
public Object front() {
return this.storage.getFirst().getContent();
}
public Queue() {
this.storage = new DListImpl();
}
}