import java.util.LinkedList;

public class LinkedQueue<T> implements Queue<T> {
    private LinkedList<T> theQ;
    
    /**
     * Default (null) constructor
     */
    public LinkedQueue() {
        theQ = new LinkedList<T>();
    } // end constructor
    
    /**
     * Get the number of elements in the Queue
     * @return the number of elements in the Queue
     */
    public int size() {
        return theQ.size();
    }
    
    /**
     * Check if Queue is empty
     * @return true if empty; false otherwise
     */
    public boolean isEmpty() {
        return theQ.isEmpty();
    }
    
    /**
     * Add an object to the back of the Queue
     * @param x the object to be added
     */
    public void enqueue(T x) {
        theQ.addLast(x);
    }
    
    /**
     * Remove the front of the Queue
     * @return the removed object
     */
    public T dequeue() {
        return theQ.removeFirst();
    }
    
    /**
     * Get the object at the front of the Queue
     * @return the front of the Queue
     */
    public T getFront() {
        return theQ.getFirst();
    }
    
    /**
     * Returns a String representation of the list the objects in the Queue
     * @return a string of the objects in the Queue
     */
    public String toString() {
        return theQ+"";
    } // end toString
    
} // end LinkedQueue<T>

