import java.util.LinkedList;
//------------------------------------------------------------------------------
//A queue class (extends linkedList) that takes a generic type
//------------------------------------------------------------------------------

public class GenericQueue<E> extends LinkedList<E> 
{
    private LinkedList<E> list = new LinkedList<E>();   //create a LinkedList

    public void push(E item)                            //receives a generic
    {
        super.addLast(item);
    }

    public E pull()                                     //returns a generic
    {
        return super.removeFirst();
    }

    public int size()
    {
        return super.size();
    }

    //if you like, you can override other parent methods, and disable them

    public boolean add(E item) {return false;}  //disable LinkedList add(E e)
    public void add(int i, E item) {}           //disable LinkedList add(int i, E e)
    public void addFirst(E item) {}             //disable LinkedList addFirst(E e)
    public E get(int index) {return null;}      //disable LinkedList get(int index)
}