public class Inbox
extends java.lang.Object
Constructor and Description |
---|
Inbox() |
Modifier and Type | Method and Description |
---|---|
void |
add(Packet p) |
void |
addToInbox(Node node,
Node target,
double delayTime,
Message m) |
Inbox |
getInboxAtThisTime(long time)
This method is similar to Inbox#getPackets(),but it returns a inbox instead of
a set of packets.
|
Message |
getNextMessage() |
java.util.LinkedList<Packet> |
getPackets(long time)
Return all packets which receiveTime is lower than the specified time.
|
int |
getSize() |
boolean |
hasMoreMessages() |
java.lang.String |
toString() |
public int getSize()
public boolean hasMoreMessages()
public void add(Packet p)
public Message getNextMessage()
public java.util.LinkedList<Packet> getPackets(long time)
time
- - the time to get the packetspublic Inbox getInboxAtThisTime(long time)
time
- - the time to get the packetspublic java.lang.String toString()
toString
in class java.lang.Object