edu.ucsb.cs.jicos.utilities
Class Qu

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.AbstractSequentialList
              extended by java.util.LinkedList
                  extended by edu.ucsb.cs.jicos.utilities.Qu
All Implemented Interfaces:
edu.ucsb.cs.jicos.foundation.Q, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.Queue

public final class Qu
extends java.util.LinkedList
implements edu.ucsb.cs.jicos.foundation.Q

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Qu()
           
 
Method Summary
 boolean add(java.lang.Object object)
          Add an object to the queue.
 java.lang.Object get()
          Get the object at the head of the queue.
 boolean isEmpty()
          Is the queue empty?
 java.lang.Object remove()
          Remove an object according to the FIFO discipline.
 java.lang.String toString()
          Returns a String representation of the object.
 
Methods inherited from class java.util.LinkedList
add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, 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, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Qu

public Qu()
Method Detail

add

public boolean add(java.lang.Object object)
Add an object to the queue.

Specified by:
add in interface edu.ucsb.cs.jicos.foundation.Q
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.LinkedList
Parameters:
object - The object to be added to the queue.
Returns:
true (as per the general contract of Collection.add).

get

public java.lang.Object get()
Get the object at the head of the queue.

Returns:
the object at the head of the queue.

remove

public java.lang.Object remove()
Remove an object according to the FIFO discipline.

Specified by:
remove in interface edu.ucsb.cs.jicos.foundation.Q
Specified by:
remove in interface java.util.Queue
Overrides:
remove in class java.util.LinkedList
Returns:
the removed object.

isEmpty

public boolean isEmpty()
Is the queue empty?

Specified by:
isEmpty in interface edu.ucsb.cs.jicos.foundation.Q
Specified by:
isEmpty in interface java.util.Collection
Specified by:
isEmpty in interface java.util.List
Overrides:
isEmpty in class java.util.AbstractCollection
Returns:
true if and only if the queue is empty.

toString

public java.lang.String toString()
Returns a String representation of the object.

Overrides:
toString in class java.util.AbstractCollection
Returns:
a String representation of the object.


Jicos: http://cs.ucsb.edu/projects/jicos