-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
34 lines (29 loc) · 835 Bytes
/
Copy pathEvent.java
File metadata and controls
34 lines (29 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* A blue print of the event object
*
* @author Khalid Almotaery
* @version 11/7/2020
*/
public class Event implements Comparable<Event>
{
int name; /** The name of the person making the event*/
int time; /** The time of the event*/
String type;
boolean wasInQueue; /** Tells wheather the customer exited the queue*/
/**
* Assigns values for the Event object.
*/
public Event(int name,int time,String type,boolean wasInQueue)
{
this.name = name;this.time = time;this.type = type;this.wasInQueue=wasInQueue;
}
/**
* Compares the events based on their time.
*
* @param e an Event type object
* @return int showing the relationship between the two times
*/
public int compareTo(Event e){
return this.time - e.time;
}
}