@@ -0,0 +1,1314 @@
+package com.knox.queue;%0A%0Aimport com.knox.Asserts;%0Aimport com.knox.LinkedList.DoublyLinkedList;%0A%0Aimport java.util.LinkedList;%0A%0Apublic class Queue%3CT%3E %7B%0A%0A    private DoublyLinkedList%3CT%3E list = new DoublyLinkedList%3C%3E();%0A%0A    public int size() %7B%0A        return list.size();%0A    %7D%0A%0A    public boolean isEmpty() %7B%0A        return list.isEmpty();%0A    %7D%0A%0A    public void clear() %7B%0A        list.clear();%0A    %7D%0A%0A    public void enQueue(T element) %7B%0A        list.append(element);%0A    %7D%0A%0A    public T deQueue() %7B%0A        return list.removeAtIndex(0);%0A    %7D%0A%0A    public T front() %7B%0A        return list.first();%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        Queue%3CInteger%3E queue = new Queue%3C%3E();%0A        queue.enQueue(10);%0A        queue.enQueue(20);%0A        queue.enQueue(30);%0A        queue.enQueue(40);%0A%0A        Asserts.testEqual(queue.size(), 4);%0A        Asserts.testFalse(queue.isEmpty());%0A%0A        LinkedList%3CInteger%3E list = new LinkedList();%0A        list.add(queue.deQueue());%0A        list.add(queue.deQueue());%0A        list.add(queue.deQueue());%0A        list.add(queue.deQueue());%0A        Asserts.testTrue(queue.isEmpty());%0A%0A        System.out.println(list);%0A%0A        queue.enQueue(50);%0A        Asserts.testEqual(queue.front(), 50);%0A%0A        queue.clear();%0A        Asserts.testTrue(queue.isEmpty());%0A    %7D%0A%0A%7D%0A

add Queue