All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dlib.Queue

java.lang.Object
   |
   +----dlib.BaseObject
           |
           +----dlib.Queue

public class Queue
extends BaseObject
a simple Queue class, which accepts the same methods as Stack objects, bit is FIFO rather than LIFO.


Variable Index

 o elementCount
the number of elements currently enqueued

Constructor Index

 o Queue()

Method Index

 o empty()
returns true if the Queue is empty
 o flush()
make it be empty
 o peek()
peek a look at the next element
 o pop()
remove the oldest element
 o push(Object)
add a new element

Variables

 o elementCount
 public int elementCount
the number of elements currently enqueued

Constructors

 o Queue
 public Queue()

Methods

 o empty
 public boolean empty()
returns true if the Queue is empty

 o flush
 public synchronized void flush()
make it be empty

 o peek
 public Object peek()
peek a look at the next element

 o push
 public synchronized void push(Object x)
add a new element

 o pop
 public synchronized Object pop()
remove the oldest element


All Packages  Class Hierarchy  This Package  Previous  Next  Index