-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
63 lines (52 loc) · 1.27 KB
/
Item.java
File metadata and controls
63 lines (52 loc) · 1.27 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
/**
* Created by krejcir on 29.4.14.
*/
public abstract class Item {
public int day;
private int start;
private int length;
private String subjectName;
public Item() {
}
public Item(int day, int start, int length) {
this.day = day;
this.start = start;
this.length = length;
}
public int getDay() {
return day;
}
public void setDay(int day) throws SmartScheduleException {
switch (day) {
case Day.MONDAY:
case Day.TUESDAY:
case Day.WEDNESDAY:
case Day.THURSDAY:
case Day.FRIDAY:
case Day.SATURDAY:
case Day.SUNDAY:
this.day = day;
break;
default:
throw new SmartScheduleException("Undefined day of week.");
}
}
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public String getSubjectName() {
return subjectName;
}
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
}