-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
36 lines (27 loc) · 790 Bytes
/
Event.java
File metadata and controls
36 lines (27 loc) · 790 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
35
36
abstract class Event {
protected final Shop shop;
protected final Customer customer;
protected final double time;
Event(Shop shop, Customer customer, double time) {
this.customer = customer;
this.shop = shop;
this.time = time;
}
public abstract Event getNextEvent(Shop shop);
public abstract int getPriority();
public abstract int getServerId();
public abstract ImList<Double> updateStatistics(ImList<Double> statistics);
public Shop getShop() {
return this.shop;
}
public Customer getCustomer() {
return this.customer;
}
public double getTime() {
return this.time;
}
@Override
public String toString() {
return this.time + customer.toString();
}
}