-
Notifications
You must be signed in to change notification settings - Fork 0
/
PastMeetingImpl.java
46 lines (39 loc) · 1 KB
/
PastMeetingImpl.java
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
import java.util.Calendar;
import java.util.Set;
public class PastMeetingImpl implements PastMeeting {
private final int meetingID;
private Calendar meetingDate;
private Set<Contact> meetingContacts;
private String meetingNotes;
public PastMeetingImpl(Calendar date, int iD, Set<Contact> contacts, String notes){
this.meetingID = iD;
this.meetingDate = date;
this.meetingContacts = contacts;
this.meetingNotes = notes;
}
public int getId(){
return meetingID;
}
public Calendar getDate(){
return meetingDate;
}
public Set<Contact> getContacts(){
return meetingContacts;
}
public String getNotes(){
return meetingNotes;
}
/**
* Adds notes to a pastMeeting.
*
* When read from a file, PastMeetings with no notes are constructed with an empty string.
* This method assumes that notes are always appended, not overwritten.
*/
public void addNotes(String note){
if (this.meetingNotes == null){
this.meetingNotes = note;
} else {
this.meetingNotes += ", " + note;
}
}
}