Class IntQueue

java.lang.Object
  extended by IntQueue

public class IntQueue
extends java.lang.Object

A IntQueue holds a sequence of int objects and provides access to them in the order that they were added to the sequence.


Constructor Summary
IntQueue()
          new IntQueue() returns a new, empty queue for ints.
 
Method Summary
 void add(int i)
          q.add(i) adds i to q.
 int get()
          q.get() returns the current item of q.
 int getCount()
          q.getCount() the number of items in q.
 void remove()
          q.remove() removes the current item of q.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntQueue

public IntQueue()
new IntQueue() returns a new, empty queue for ints.

Method Detail

getCount

public int getCount()
q.getCount() the number of items in q.


add

public void add(int i)
q.add(i) adds i to q.


get

public int get()
q.get() returns the current item of q.

Precondition: q.getCount() > 0.


remove

public void remove()
q.remove() removes the current item of q.

Precondition: q.getCount() > 0.