mako5.util
Interface Queue<T>

All Known Implementing Classes:
ArrayQueue, ListQueue

public interface Queue<T>

A queue interface.

Version:
2-Feb 2006, 24-May 2006
Author:
Paul Jarrett

Method Summary
 void clear()
          Removes all elements from this queue.
 T dequeue()
          Dequeues this queue.
 void enqueue(T rObj)
          Enqueues this queue.
 boolean isEmpty()
          Returns true if there are no more elements in this.
 int size()
          Returns the number of elements in this.
 

Method Detail

dequeue

T dequeue()
Dequeues this queue.

Returns:
the next object from this queue
Since:
24-May 2006

enqueue

void enqueue(T rObj)
Enqueues this queue.

Parameters:
rObj - the object to add to the queue
Since:
24-May 2006

isEmpty

boolean isEmpty()
Returns true if there are no more elements in this.

Returns:
true if this queue is empty
Since:
24-May 2006

clear

void clear()
Removes all elements from this queue.

Since:
24-May 2006

size

int size()
Returns the number of elements in this.

Returns:
the number of elements in the queue
Since:
24-May 2006