Class ConferenceRoom
java.lang.Object
de.gustavblass.fsu.fmi.roombooking.model.room.Room
de.gustavblass.fsu.fmi.roombooking.model.room.ConferenceRoom
- All Implemented Interfaces:
Identified
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull Set<CommonEquipment> TheCommonEquipmentavailable in the Room, useful to all of the Room's occupants. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommonEquipment(@NonNull CommonEquipment equipment) Replaces theCommonEquipmentincommonEquipmentthat has same type as the given equipment with the given equipment.@NonNull Set<CommonEquipment> Returns a copy of thecommonEquipmentset.@NonNull Optional<CommonEquipment> getCommonEquipment(@NonNull CommonEquipmentType type) @NonNull RoomTypegetType()voidremoveAllCommonEquipment(@NonNull CommonEquipmentType type) voidremoveAllCommonEquipment(@NonNull Collection<CommonEquipment> equipment) Deletes multipleCommonEquipmentfrom thecommonEquipmentset.voidremoveCommonEquipment(@NonNull CommonEquipment equipment) Deletes the givenCommonEquipmentfrom thecommonEquipmentset.Methods inherited from class Room
addIndividualEquipment, addReservation, getAccessibility, getFloor, getIndividualEquipment, getIndividualEquipment, getNotes, getReservations, removeAllIndividualEquipment, removeAllIndividualEquipment, removeIndividualEquipment, setCapacityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Identified
getId
-
Field Details
-
commonEquipment
TheCommonEquipmentavailable in the Room, useful to all of the Room's occupants. By definition, eachRoomEquipment.typecan only be present once.
-
-
Constructor Details
-
ConferenceRoom
public ConferenceRoom()
-
-
Method Details
-
getType
- Specified by:
getTypein classRoom- Returns:
- Always
RoomType.CONFERENCE_ROOM
-
addCommonEquipment
Replaces theCommonEquipmentincommonEquipmentthat has same type as the given equipment with the given equipment.- Parameters:
equipment- The equipment that shall replace the currently present equipment of the same CommonEquipment type.
-
removeCommonEquipment
Deletes the givenCommonEquipmentfrom thecommonEquipmentset.- Parameters:
equipment- The CommonEquipment that shall no longer be present in this Room.
-
removeAllCommonEquipment
Deletes multipleCommonEquipmentfrom thecommonEquipmentset.- Parameters:
equipment- The CommonEquipment that shall no longer be present in this Room.
-
removeAllCommonEquipment
- Parameters:
type- TheCommonEquipmentTypethat shall no longer be present in this Room.
-
getCommonEquipment
Returns a copy of thecommonEquipmentset.- Returns:
- Copy of the
CommonEquipmentpresent in this Room.
-
getCommonEquipment
@Contract(pure=true) @NonNull public @NonNull Optional<CommonEquipment> getCommonEquipment(@NonNull @NonNull CommonEquipmentType type) Finds theCommonEquipmentin thecommonEquipmentof the givenRoomEquipment.type. Note that there is only one CommonEquipment object of eachCommonEquipmentType! You probably do not need to call this method.- Parameters:
type- The CommonEquipmentType that the returned CommonEquipment object shall match.- Returns:
- The CommonEquipment matching the given type, if existent.
-