Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jgift.command
Class CommandQueue  view CommandQueue download CommandQueue.java

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byjgift.command.CommandQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.lang.Iterable, java.util.List, java.util.RandomAccess, java.io.Serializable

public class CommandQueue
extends java.util.ArrayList

Data structure for holding Command objects in a FIFO fashion.

Version:
$Revision: 1.1 $

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
 
Fields inherited from class java.util.ArrayList
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CommandQueue()
           
 
Method Summary
 Command dequeue()
          Gets the command at the head of this queue.
 void enqueue(Command command)
          Adds a command to the end of this queue.
 boolean isCommandAvailable()
          Determines if there are any commands in this queue.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, 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, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

CommandQueue

public CommandQueue()
Method Detail

enqueue

public void enqueue(Command command)
Adds a command to the end of this queue.


dequeue

public Command dequeue()
Gets the command at the head of this queue. This method will block until there is a command available in the queue.


isCommandAvailable

public final boolean isCommandAvailable()
Determines if there are any commands in this queue.