Class Person
java.lang.Object
|
+----Person
- public class Person
- extends Object
This class holds information about an individual person.
- Author:
- Vegard Brox
-
FEMALE
- A constant value representing females
-
MALE
- A constant value representing males
-
Person(String, YearRange, YearRange, YearRange, YearRange, int, String, Vector)
- Constructor that initialise an object with the specified values.
-
getBirth()
- Returns the birth date of the person
-
getBurial()
- Returns the burial date of the person
-
getCFamily()
- Returns the ID of the family where this person is a child
-
getChristening()
- Returns the christening date of the person
-
getDeath()
- Returns the death date of the person
-
getID()
- Returns the ID of the person
-
getSFamilies()
- Returns IDs of families where this person is a spouse
-
isFemale()
- Returns if the person is a female
-
isMale()
- Returns if the person is a male
-
toString()
- Returns a string representation of this object.
MALE
public static final int MALE
- A constant value representing males
FEMALE
public static final int FEMALE
- A constant value representing females
Person
public Person(String id,
YearRange birth,
YearRange death,
YearRange christening,
YearRange burial,
int sex,
String cFamily,
Vector sFamilies)
- Constructor that initialise an object with the specified values.
- Parameters:
- id - ID of the person
- birth - A year range for the birth date of the person
- death - A year range for the death date of the person
- christening - A year range for the christening date of the person
- burial - A year range for the burial date of the person
- sex - The sex of the person - either MALE or FEMALE
- cFamily - The ID of the family where this person is a child
- sFamilies - A vector of IDs of families where this person is a spouse
getID
public String getID()
- Returns the ID of the person
- Returns:
- The ID as a string
getBirth
public YearRange getBirth()
- Returns the birth date of the person
- Returns:
- A year range for the birth date of the person
getDeath
public YearRange getDeath()
- Returns the death date of the person
- Returns:
- A year range for the death date of the person
getChristening
public YearRange getChristening()
- Returns the christening date of the person
- Returns:
- A year range for the christening date of the person
getBurial
public YearRange getBurial()
- Returns the burial date of the person
- Returns:
- A year range for the burial date of the person
isMale
public boolean isMale()
- Returns if the person is a male
- Returns:
- True if the person is male, false otherwise
isFemale
public boolean isFemale()
- Returns if the person is a female
- Returns:
- True if the person is female, false otherwise
getCFamily
public String getCFamily()
- Returns the ID of the family where this person is a child
- Returns:
- The ID of the family where this person is a child
getSFamilies
public Enumeration getSFamilies()
- Returns IDs of families where this person is a spouse
- Returns:
- An enumeration containing IDs of families where
this person is a spouse
toString
public String toString()
- Returns a string representation of this object.
- Returns:
- The ID of this person, which is a string
representation of the object
- Overrides:
- toString in class Object