Class Person
java.lang.Object
cz.cuni.kubinja.hospitalsystem.personnel.Person
- All Implemented Interfaces:
Exportable
Represents generic person in hospital system.
-
Constructor Summary
ConstructorsConstructorDescriptionPerson(int id, PersonData personData) Creates person based on id and data wrapper for rest of needed parameters.Creates person based on provided parameters.Creates person based on provided parameters.Creates new Person as a copy of provided Person. -
Method Summary
Modifier and TypeMethodDescriptionexport()Text format that will be used for exporting object.intgetAge()Returns age of the person.static StringReturns custom identifier for Person class.Returns date of birth of personReturns firstname of person.intgetId()Provides unique identification number of personReturns lastname of person.toString()
-
Constructor Details
-
Person
-
Person
Creates person based on provided parameters.- Parameters:
id- unique identification numberfirstName- first name of personlastName- last name of personday- day of birthmonth- month of birthyear- year of birth
-
Person
Creates new Person as a copy of provided Person.- Parameters:
person- Person that the constructor should copy.
-
Person
Creates person based on id and data wrapper for rest of needed parameters.- Parameters:
id- Identification number of the person.personData- Data wrapper for the data needed for person creation.
-
-
Method Details
-
getId
public int getId()Provides unique identification number of person- Returns:
- Unique identification number
-
getFirstName
-
getLastName
-
getDateOfBirth
Returns date of birth of person- Returns:
- LocalDate object representing date of birth of person
-
getAge
public int getAge()Returns age of the person.- Returns:
- age of the person.
-
getClassIdentifier
Returns custom identifier for Person class.- Returns:
- custom identifier for Person class.
-
toString
-
export
Description copied from interface:ExportableText format that will be used for exporting object.- Specified by:
exportin interfaceExportable- Returns:
- text that will be used for exporting object.
-