Package application.model
Klasse Person
java.lang.Object
application.model.Person
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetMisc()getName()static PersonparseFromCSVLine(String line, int lineNumber) Parsing lines in the format: birthday;name the name is expected like this: name, surname, misc the birthday is expected like this: dd.MM.yyyystatic PersonparseFromTXTLine(String line, int lineNumber) voidsetBirthday(LocalDate birthday) voidvoidvoidsetSurname(String surname) toString()String representation of the person with the format:
name misc surname=dd.mm.yyyy
-
Felddetails
-
DATE_FORMATTER
-
-
Konstruktordetails
-
Person
public Person()Create an empty person -
Person
Creates a new person with all attributes- Parameter:
surname- The surname of the personname- The name of the personmisc- The middle name of the person of or everything if it could not get parsed properlybirthday- the Birthday of the person
-
-
Methodendetails
-
parseFromCSVLine
public static Person parseFromCSVLine(String line, int lineNumber) throws Person.PersonCouldNotBeParsedException Parsing lines in the format: birthday;name- the name is expected like this: name, surname, misc
- the birthday is expected like this: dd.MM.yyyy
The name and surname are mandatory
- Parameter:
line- a read line from the filelineNumber- which line of the file is parsed right now- Gibt zurück:
- a new Person resulting from the given String
- Löst aus:
Person.PersonCouldNotBeParsedException
-
parseFromTXTLine
public static Person parseFromTXTLine(String line, int lineNumber) throws Person.PersonCouldNotBeParsedException - Parameter:
line- a read line from the Text-file- Gibt zurück:
- a new Person resulting from the given String
- Löst aus:
Person.PersonCouldNotBeParsedException
-
getBirthday
- Gibt zurück:
- the birthday of the person
-
setBirthday
- Parameter:
birthday- the birthday to set
-
getMisc
- Gibt zurück:
- the middle name / everything of the person
-
setMisc
- Parameter:
misc- the middle name to set
-
getName
- Gibt zurück:
- the name of the person
-
setName
- Parameter:
name- the name to set
-
getSurname
- Gibt zurück:
- the surname of the person
-
setSurname
- Parameter:
surname- the surname to set
-
toString
-
namesToString
-
toTXTString
String representation of the person with the format:
name misc surname=dd.mm.yyyy- Gibt zurück:
- The String representation of the person for a TXT-file.
-
toCSVString
- Gibt zurück:
- a CSV-String representation of the person.
-
toExtendedString
- Gibt zurück:
- a ExtendedString of the person for Debugging
-