weiss.util
Interface Queue<AnyType>

All Superinterfaces:
Collection<AnyType>, java.lang.Iterable<AnyType>, java.io.Serializable
All Known Implementing Classes:
LinkedList, PriorityQueue

public interface Queue<AnyType>
extends Collection<AnyType>

Queue interface.


Method Summary
 AnyType element()
          Returns but does not remove the item at the "front" of the queue.
 AnyType remove()
          Returns and removes the item at the "front" of the queue.
 
Methods inherited from interface weiss.util.Collection
add, clear, contains, isEmpty, iterator, remove, size, toArray, toArray
 

Method Detail

element

AnyType element()
Returns but does not remove the item at the "front" of the queue.

Returns:
the front item of null if the queue is empty.
Throws:
NoSuchElementException - if the queue is empty.

remove

AnyType remove()
Returns and removes the item at the "front" of the queue.

Returns:
the front item.
Throws:
NoSuchElementException - if the queue is empty.