All Packages Class Hierarchy This Package Previous Next Index
Class key.Queue
java.lang.Object
|
+----key.Queue
- public class Queue
- extends Object
Implementation of a simple FIFO queue
-
Queue()
- creates the queue
-
count()
- Returns the number of objects in the queue
-
pop()
- Takes the first object off the queue and returns it
-
push(Object)
- Adds another object to the queue
Queue
public Queue()
- creates the queue
push
public void push(Object store)
- Adds another object to the queue
- Parameters:
- store - the object to be added
pop
public Object pop() throws NoSuchElementException
- Takes the first object off the queue and returns it
- Returns:
- the first object from the queue
count
public int count()
- Returns the number of objects in the queue
- Returns:
- the number of objects in the queue
All Packages Class Hierarchy This Package Previous Next Index