-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToDoItem.java
69 lines (52 loc) · 1.31 KB
/
ToDoItem.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import java.util.HashSet;
import java.util.GregorianCalendar;
import java.util.Set;
public class ToDoItem {
private String task;
private GregorianCalendar dueDate;
private String assignee;
private boolean isPriority;
private boolean isFinished;
private HashSet<String> tags;
public ToDoItem(String task) {
this.task = task;
isFinished = false;
tags = new HashSet<>();
}
public void setDueDate(GregorianCalendar dueDate){
this.dueDate = dueDate;
}
public void setAssignee(String assignee){
this.assignee = assignee;
}
public void setPriority (boolean priority){
this.isPriority = priority;
}
public void setTask (String task){
this.task = task;
}
public void addTag (String tag){
this.tags.add(tag);
}
public GregorianCalendar getDueDate(){
return dueDate;
}
public String getAssignee(){
return assignee;
}
public boolean getIsPriority(){
return isPriority;
}
public boolean containsTag(String tag){
return tags.contains(tag);
}
public Set<String> getTags(){
return tags;
}
public void setFinishTask(){
isFinished = true;
}
public boolean getIsFinished(){
return isFinished;
}
}