Class semper.util.queue.Queue
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.util.queue.Queue

java.lang.Object
   |
   +----semper.util.queue.Queue

public class Queue
extends Object
Implements a FIFO queue.
Version:
beta-1.0, 26.7.96
Author:
Mehdi Nassehi

Constructor Index

 o Queue()
Constructs a queue.

Method Index

 o dequeue()
Dequeues an item from the queue.
 o enqueue(Object)
Enqueues an item into the queue.
 o inspect()
Returns the value at the head of the queue without dequeueing it.
 o isEmpty()
Returns true if the queue is empty.

Constructors

 o Queue
  public Queue()
Constructs a queue.

Methods

 o enqueue
  public synchronized void enqueue(Object item)
Enqueues an item into the queue.
Parameters:
item - item to be enqueued
 o inspect
  public Object inspect()
Returns the value at the head of the queue without dequeueing it.
Returns:
the item at the head of the queue
Throws: EmptyQueueException
If the queue is empty.
 o dequeue
  public synchronized Object dequeue()
Dequeues an item from the queue.
Returns:
the item at the head of the queue
Throws: EmptyQueueException
If the queue is empty.
 o isEmpty
  public boolean isEmpty()
Returns true if the queue is empty.

All Packages  Class Hierarchy  This Package  Previous  Next  Index