ch.sahits.game.openpatrician.model.personal.impl
Class PersonalData

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.personal.impl.PersonalData
All Implemented Interfaces:
IPersonalData
Direct Known Subclasses:
SpouseData

public class PersonalData
extends Object
implements IPersonalData


Field Summary
private  DateObject birthDate
           
private  ICity birthplace
           
private  String lastName
           
private  boolean male
           
private  String name
           
 
Constructor Summary
PersonalData(String name, String lastName, boolean male, ICity birthplace, DateObject birthDate)
          Initialize personal data without portrait
 
Method Summary
 boolean equals(Object obj)
           
 int getAge(DateObject now)
          Compute the current age
 DateObject getBirthDate()
          Retrieve the birth date
 ICity getBirthPlace()
          Retrieve the birth place
 String getLastName()
          Get a players last name
 String getName()
          Retrieve the players name
 int hashCode()
           
 boolean isMale()
          Check if the player is male
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private final String name

lastName

private final String lastName

male

private final boolean male

birthplace

private final ICity birthplace

birthDate

private final DateObject birthDate
Constructor Detail

PersonalData

public PersonalData(String name,
                    String lastName,
                    boolean male,
                    ICity birthplace,
                    DateObject birthDate)
Initialize personal data without portrait

Parameters:
name -
lastName -
male -
birthplace -
birthDate -
Method Detail

getName

public String getName()
Description copied from interface: IPersonalData
Retrieve the players name

Specified by:
getName in interface IPersonalData
Returns:

getLastName

public String getLastName()
Description copied from interface: IPersonalData
Get a players last name

Specified by:
getLastName in interface IPersonalData
Returns:

isMale

public boolean isMale()
Description copied from interface: IPersonalData
Check if the player is male

Specified by:
isMale in interface IPersonalData
Returns:

getBirthPlace

public ICity getBirthPlace()
Description copied from interface: IPersonalData
Retrieve the birth place

Specified by:
getBirthPlace in interface IPersonalData
Returns:

getBirthDate

public DateObject getBirthDate()
Description copied from interface: IPersonalData
Retrieve the birth date

Specified by:
getBirthDate in interface IPersonalData
Returns:

getAge

public int getAge(DateObject now)
Description copied from interface: IPersonalData
Compute the current age

Specified by:
getAge in interface IPersonalData
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.