-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.java
More file actions
69 lines (55 loc) · 1.2 KB
/
Event.java
File metadata and controls
69 lines (55 loc) · 1.2 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
public class Event {
public double time; // le temps
public int index;
public Sim subject;
public char type; // les evenements possibles sont :
// n = naissance, m = mort, r = reproduction, z = nope, h = head
public Event(double time, int index, Sim subject, char type) {
this.time = time;
this.index = index;
this.subject = subject;
this.type = type;
}
public Event(double inf, char z) {
time = inf;
type = z;
}
public Event(double time, Sim fondateur, char s) {
this.time = time;
this.subject = fondateur;
this.type = s;
}
public void setTime(double time) {
this.time = time;
}
public void setIndex(int index) {
this.index = index;
}
public void setSubject(Sim subject) {
this.subject = subject;
}
public void setType(char type) {
this.type = type;
}
public double getTime() {
return time;
}
public int getIndex() {
return index;
}
public Sim getSubject() {
return subject;
}
public char getType() {
return type;
}
@Override
public String toString() {
return "Event{" +
"time=" + time +
", index=" + index +
", subject=" + subject +
", type=" + type +
'}';
}
}