| Modifier and Type | Field | Description |
|---|---|---|
private Message |
MessageListNode.value |
the value of the MessageListNode
|
| Modifier and Type | Method | Description |
|---|---|---|
Message |
MessageListNode.getValue() |
Returns the value of the MessageListNode
|
Message |
MessagePriorityQueue.peek() |
Returns the highest-priority Message (0 is the highest, 4 is the lowest)
|
Message |
MessageQueue.peek() |
Returns the first Message in the queue (without removing it); which
should be the first one added to the queue (FIFO)
|
Message |
MessagePriorityQueue.remove() |
Returns and removes the highest-priority Message (0 is the highest,
4 is the lowest)
|
Message |
MessageQueue.remove() |
Returns and removes the first Message in the queue, which should be the first
one added to the queue (FIFO)
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
MessagePriorityQueue.add(Message msg) |
Adds a Message to the MessageQueue at the index of its priority
in queues
|
void |
MessageQueue.add(Message msg) |
Adds a Message to the queue
|
private static void |
PriorityQueueTest.process(Message msg) |
Processes msg by calculating the waiting time then adding it to the
correct position (its corresponding priority level) in waitingTimes
|
void |
MessageListNode.setValue(Message msg) |
Sets the value of the MessageListNode
|
| Constructor | Description |
|---|---|
MessageListNode(Message msg) |
Constructs a new MessageListNode that does not have a MessageListNode
after it with a value of msg
|
MessageListNode(Message msg,
MessageListNode nxt) |
Constructs a new MessageListNode that does not have a MessageListNode
after it with a value of msg
|