public class Message
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private int |
arrival |
The time at which the Message arrives
|
private int |
priority |
The priority of the message - which is important as Messages are used
in a PriorityQueue class
|
| Constructor | Description |
|---|---|
Message(int p,
int a) |
Constructs a Message with both a priority and an arrival time
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getArrivalTime() |
Returns the arrival time of the Message
|
int |
getPriority() |
Returns the priority of the Message
|
private int priority
private int arrival
public Message(int p,
int a)
p - the priority of the Messagea - the arrival time of the Messagepublic int getPriority()
public int getArrivalTime()