All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class VisiModel.FIFO

java.lang.Object
   |
   +----VisiModel.FIFO

public class FIFO
extends Object
Implements a first-in-first-out (FIFO) list of objects.

Version:
$Revision: 1.8 $, $Date: 2000/10/12 14:09:12 $
Author:
Mike Spengler, Joseph Thomas

Variable Index

 o count
The number of components in the FIFO.
 o maxcount
The high-water mark of components in the FIFO.
 o name
A name identifying the creator of this queue.
 o queue
Internal fifo list XXX for performance we should convert to a non-Vector implementation

Constructor Index

 o FIFO()
Class constructor.
 o FIFO(String)
Class constructor.

Method Index

 o delete(Object)
 o dequeue()
Removes and returns the first object in this FIFO.
 o drain()
Removes all objects in this FIFO.
 o elementAt(int)
 o enqueue(Object)
Adds the specified object to the end of this FIFO.
 o getQueueIteration()
 o size()
Gets the number of objects in this FIFO.

Variables

 o queue
 private VectorIter queue
Internal fifo list XXX for performance we should convert to a non-Vector implementation

 o name
 private String name
A name identifying the creator of this queue.

 o count
 private int count
The number of components in the FIFO.

 o maxcount
 private int maxcount
The high-water mark of components in the FIFO.

Constructors

 o FIFO
 public FIFO(String name)
Class constructor.

 o FIFO
 public FIFO()
Class constructor.

Methods

 o enqueue
 public synchronized void enqueue(Object o)
Adds the specified object to the end of this FIFO.

Parameters:
o - the object to be placed at the end of the FIFO
 o dequeue
 public synchronized Object dequeue() throws NoSuchElementException
Removes and returns the first object in this FIFO.

Returns:
the first component in this FIFO
 o drain
 public synchronized void drain()
Removes all objects in this FIFO.

 o size
 public int size()
Gets the number of objects in this FIFO.

Returns:
the number of object in this FIFO
 o getQueueIteration
 public synchronized VIteration getQueueIteration()
 o delete
 public synchronized void delete(Object o)
 o elementAt
 public Object elementAt(int idx)

All Packages  Class Hierarchy  This Package  Previous  Next  Index