public class DaySchedule
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Day |
day |
private static long |
serialVersionUID
Attributes a unique ID to the class to make serialization work.
|
private java.util.List<TimeSlot> |
timeSlots
A DaySchedule is divided into multiple TimeSlots
|
Constructor and Description |
---|
DaySchedule(Day day)
Default constructor.
|
DaySchedule(DaySchedule daySchedule)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addTimeSlot(TimeSlot newTimeSlot)
Adds a time slot to the day schedule, making sure it doesn't overlap any
existing time slot.
|
boolean |
equals(java.lang.Object o) |
private Day |
getDay() |
java.lang.String |
getDayName() |
java.util.List<TimeSlot> |
getTimeSlots() |
int |
hashCode() |
boolean |
isEmpty() |
private static final long serialVersionUID
private final java.util.List<TimeSlot> timeSlots
private final Day day
public DaySchedule(Day day)
day
- public DaySchedule(DaySchedule daySchedule)
daySchedule
- private Day getDay()
public java.util.List<TimeSlot> getTimeSlots()
public java.lang.String getDayName()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final void addTimeSlot(TimeSlot newTimeSlot)
newTimeSlot
- public boolean isEmpty()