Class Queue

java.lang.Object
  |
  +--Queue

public class Queue
extends Object

A first in first out queue of integers

See Also:
PQ

Constructor Summary
Queue(int maxN)
          Constructs a Queue with a maximum number of integers
 
Method Summary
 int get()
          Gets the next int off the Queue.
 boolean isEmpty()
          Figures out whether this Queue is empty
 void put(int v)
          Puts a new int on the Queue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Queue

public Queue(int maxN)
Constructs a Queue with a maximum number of integers
Method Detail

isEmpty

public boolean isEmpty()
Figures out whether this Queue is empty
Returns:
true if empty

put

public void put(int v)
Puts a new int on the Queue
Parameters:
v - int put on the Queue
See Also:
get()

get

public int get()
Gets the next int off the Queue. Uses FIFO policy.
Returns:
an the integer
See Also:
put(int)


Visualization of Graph Algorithms

Author: Paul Simbi
Started by: Kevin Wayne
2002