Class Department
java.lang.Object
cz.cuni.kubinja.hospitalsystem.calendar.Department
Manager of appointments for department.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SortedSet<Appointment> Sorted set of the appointments connected with the departmentstatic final intLength of the slot in minutesName of the departmentstatic final intNumber of slots in hourstatic final intSize of the prefix in calendarstatic final intSize of the atomic time slot -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAppointment(Appointment appointment) Adds appointment info the department calendar.voidComputes hierarchy how to arrange appointments so the parallel appointments do not overlap in the calendar diagram.intnumberOfAppearances(Person person) Returns number of appointments that are connected to the provided person.intsize()Returns number of appointments that are planned in the department.toString()Returns string representation of department calendar.toString(boolean fromToday) Returns string representation of department calendar.
-
Field Details
-
name
Name of the department -
appointments
Sorted set of the appointments connected with the department -
prefixSize
public static final int prefixSizeSize of the prefix in calendar- See Also:
-
sizeOfSlot
public static final int sizeOfSlotSize of the atomic time slot- See Also:
-
lengthOfSlotInMinutes
public static final int lengthOfSlotInMinutesLength of the slot in minutes- See Also:
-
numberOfSlotsInHour
public static final int numberOfSlotsInHourNumber of slots in hour- See Also:
-
-
Method Details
-
addAppointment
Adds appointment info the department calendar.- Parameters:
appointment- Appointment that will be added into department calendar.
-
computeLayers
public void computeLayers()Computes hierarchy how to arrange appointments so the parallel appointments do not overlap in the calendar diagram. -
toString
-
toString
Returns string representation of department calendar.- Parameters:
fromToday- Denotes whether calendar will be exported whole or only appointments in the present and future.- Returns:
- String representation of department calendar.
-
size
public int size()Returns number of appointments that are planned in the department.- Returns:
- Number of appointments that are planned in the department.
-
numberOfAppearances
Returns number of appointments that are connected to the provided person.- Parameters:
person- Person for who is computed how many times had or will have appointment.- Returns:
- Number of appointments that are connected to the provided person.
-