Boeing Simulation 3.1 API Specification

util
Class SimpleQueue

java.lang.Object
  |
  +--util.SimpleQueue
All Implemented Interfaces:
Queue

public class SimpleQueue
extends Object
implements Queue

A multithreaded queue

Version:
Author:
Jim Adamich
, Dave Jurgens , James Brodman

Field Summary
private  LinkedList queue
           
private static long serialVersionUID
           
 
Constructor Summary
SimpleQueue()
           
 
Method Summary
 Object dequeue()
          Returns the item at the bottom of the queue.
 void enqueue(Object o)
          Enqueues the specified object.
 boolean isEmpty()
          Returns whether the queue is currently empty.
 int size()
          Returns the number of items currently in the queue.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

queue

private final LinkedList queue
Constructor Detail

SimpleQueue

public SimpleQueue()
Method Detail

enqueue

public void enqueue(Object o)
Enqueues the specified object.

Specified by:
enqueue in interface Queue

dequeue

public Object dequeue()
Returns the item at the bottom of the queue. If the queue is empty, this call will block until it is non-empty.

Specified by:
dequeue in interface Queue

isEmpty

public boolean isEmpty()
Description copied from interface: Queue
Returns whether the queue is currently empty.

Specified by:
isEmpty in interface Queue

size

public int size()
Description copied from interface: Queue
Returns the number of items currently in the queue.

Specified by:
size in interface Queue

toString

public String toString()
Overrides:
toString in class Object

Boeing Simulation 3.1 API Specification

To submit a bug or feature email the author of that class. Funding for this research was provided by Boeing and DARPA.