Class PersonalData
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.personal.impl.PersonalData
-
- All Implemented Interfaces:
IPersonalData
- Direct Known Subclasses:
SpouseData
public class PersonalData extends java.lang.Object implements IPersonalData
-
-
Constructor Summary
Constructors Constructor Description PersonalData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAge(java.time.LocalDateTime now)
Compute the current age-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.personal.IPersonalData
getBirthDate, getBirthPlace, getLastName, getName, isMale
-
-
-
-
Field Detail
-
name
private final java.lang.String name
-
lastName
private final java.lang.String lastName
-
male
private final boolean male
-
birthPlace
private final ICity birthPlace
-
birthDate
private final java.time.LocalDateTime birthDate
-
-
Method Detail
-
getAge
public int getAge(java.time.LocalDateTime now)
Description copied from interface:IPersonalData
Compute the current age- Specified by:
getAge
in interfaceIPersonalData
- Parameters:
now
- date- Returns:
- age in years per
current
-
-