Class LinkedQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList
                  extended by LinkedQueue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.Queue

public class LinkedQueue
extends java.util.LinkedList

Yuriy Kozlov
PuzzleGUI.java -- Final Project

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
LinkedQueue()
          Constructs an empty queue
 
Method Summary
 java.lang.Object peek()
          Returns the first item from the queue.
 java.lang.Object pop()
          Removes the first item from the queue.
 void push(java.lang.Object o)
          Adds the object to the end of the queue.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

LinkedQueue

public LinkedQueue()
Constructs an empty queue

Method Detail

pop

public java.lang.Object pop()
Removes the first item from the queue.

Returns:
The first item from the queue.

push

public void push(java.lang.Object o)
Adds the object to the end of the queue.

Parameters:
o - An object to add.

peek

public java.lang.Object peek()
Returns the first item from the queue.

Specified by:
peek in interface java.util.Queue
Overrides:
peek in class java.util.LinkedList
Returns:
Returns the first item from the queue.