-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDone.java
More file actions
35 lines (28 loc) · 765 Bytes
/
Done.java
File metadata and controls
35 lines (28 loc) · 765 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
class Done extends Event {
private static final int PRIORITY = 2;
private final int serverId;
Done(Shop shop, Customer customer, double time, int serverId) {
super(shop, customer, time);
this.serverId = serverId;
}
@Override
public Event getNextEvent(Shop shop) {
return this;
}
public int getPriority() {
return PRIORITY;
}
@Override
public int getServerId() {
return serverId;
}
@Override
public ImList<Double> updateStatistics(ImList<Double> statistics) {
return statistics;
}
@Override
public String toString() {
return String.format("%.3f ",this.time) + customer.toString()
+ " done serving by " + serverId;
}
}