Class PacketQueue

java.lang.Object
  extended by PacketQueue

public class PacketQueue
extends java.lang.Object

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


Constructor Summary
PacketQueue()
          new PacketQueue() returns a new, empty queue for Packets.
 
Method Summary
 void add(Packet i)
          q.add(i) adds i to q.
 Packet 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

PacketQueue

public PacketQueue()
new PacketQueue() returns a new, empty queue for Packets.

Method Detail

getCount

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


add

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


get

public Packet 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.