mako5.util
Class ListQueue<T>

java.lang.Object
  extended by mako5.util.ListQueue<T>
All Implemented Interfaces:
Queue<T>

public final class ListQueue<T>
extends Object
implements Queue<T>

Makes a new queue.

Version:
2-Feb 2006, 05-Apr 2006, placed under Queue interface
Author:
Paul Jarrett
See Also:
Queue

Constructor Summary
ListQueue(List<T> rAlias_)
          Makes a new ListQueue with the given type of list.
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListQueue

public ListQueue(List<T> rAlias_)
Makes a new ListQueue with the given type of list. Stores info in the list passed to us.

Method Detail

dequeue

public T dequeue()
Dequeues this queue

Specified by:
dequeue in interface Queue<T>
Returns:
the next object from this queue

enqueue

public void enqueue(T rObj)
Enqueues this queue

Specified by:
enqueue in interface Queue<T>
Parameters:
rObj - the object to add to the queue

isEmpty

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

Specified by:
isEmpty in interface Queue<T>
Returns:
true if this queue is empty

clear

public void clear()
Removes all elements from this queue

Specified by:
clear in interface Queue<T>

size

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

Specified by:
size in interface Queue<T>
Returns:
the number of elements in the queue