Class Dormitory
java.lang.Object
com.montytskyi.Residences.Implementations.Dormitory
- All Implemented Interfaces:
ResidenceServiceable
The class which represents the Dormitory which will be managed by the system. The Dormitory class is implemented from the ResidenceServiceable interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdministrator
(Administrator admin) An implemented method from the interface ResidenceServiceable which allows to add an administrator for the specific Dormitoryvoid
An implemented method from the interface ResidenceServiceable which allows to add a rentable place to the dormitoryvoid
An implemented method from the interface ResidenceServiceable which allows to add a rent to the dormitoryA getter method which allows to get the collection of the administratorsA getter method which return the list of places which are the part of the dormitorygetRents()
A getter method which returns the list of existing rents in the dormitoryvoid
removeAdministrator
(Administrator admin) An implemented method from the interface ResidenceServiceable which allows to remove an administrator from the specific Dormitoryvoid
removePlace
(Liveable place) An implemented method from the interface ResidenceServiceable which allows to add remove an existing in the dormitory placevoid
removeRent
(Rentable rent) An implemented method from the interface ResidenceServiceable which allows to remove an existing rent from the dormitoryvoid
setAdmins
(List<Administrator> admins) A setter method which allows to set the collection of the administrators for the dormitoryvoid
A setter method which sets the list of places which are the part of the dormitoryvoid
A setter method which sets the collection of rents which will be contained in the Dormitory
-
Constructor Details
-
Dormitory
A constructor that receives all the parameters possible- Parameters:
rents
- - the collection of rents which is in charge of containing the dormitory rentsadmins
- - the collection of administrators which is responsible of containing the dormitory administratorsplaces
- - the collection of places which is responsible of containing all the dormitory renting places
-
Dormitory
public Dormitory()An empty constructor of the Dormitory class
-
-
Method Details
-
addRent
An implemented method from the interface ResidenceServiceable which allows to add a rent to the dormitory- Specified by:
addRent
in interfaceResidenceServiceable
- Parameters:
rent
- - represents a rent made by an user
-
removeRent
An implemented method from the interface ResidenceServiceable which allows to remove an existing rent from the dormitory- Specified by:
removeRent
in interfaceResidenceServiceable
- Parameters:
rent
- - represent a rent made by an user
-
addPlace
An implemented method from the interface ResidenceServiceable which allows to add a rentable place to the dormitory- Specified by:
addPlace
in interfaceResidenceServiceable
- Parameters:
place
- - represents a place which is able to be rented by an user
-
removePlace
An implemented method from the interface ResidenceServiceable which allows to add remove an existing in the dormitory place- Specified by:
removePlace
in interfaceResidenceServiceable
- Parameters:
place
- - represents a place which is able to be rented by an user
-
addAdministrator
An implemented method from the interface ResidenceServiceable which allows to add an administrator for the specific Dormitory- Specified by:
addAdministrator
in interfaceResidenceServiceable
- Parameters:
admin
- - the administrator who will be in charge of the specific residence
-
removeAdministrator
An implemented method from the interface ResidenceServiceable which allows to remove an administrator from the specific Dormitory- Specified by:
removeAdministrator
in interfaceResidenceServiceable
- Parameters:
admin
- - the administrator that should be removed from the specific residence
-
getRents
-
setRents
-
getAdmins
A getter method which allows to get the collection of the administrators- Returns:
- admins - the list of existing administrator in the dormitory
-
setAdmins
A setter method which allows to set the collection of the administrators for the dormitory- Parameters:
admins
- - the list of administrators of the specific dormitory
-
getPlaces
-
setPlaces
-